mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
210 B
Swift
15 lines
210 B
Swift
// RUN: %target-run-simple-swift | %FileCheck %s
|
|
// REQUIRES: executable_test
|
|
|
|
func foo(_ x: inout Int) {
|
|
func bar() -> Int {
|
|
x += 1
|
|
return x
|
|
}
|
|
bar()
|
|
}
|
|
|
|
var x = 219
|
|
foo(&x)
|
|
print(x) // CHECK: 220
|