Sign in
fuchsia
/
third_party
/
swift
/
a62ebd9650c2de5ce8174d0b16a3894e974235f2
/
.
/
test
/
Interpreter
/
capture_inout.swift
blob: 1b9d54dc44586752dbb47446bc0ad64ea63d34aa [
file
] [
log
] [
blame
]
// 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