mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
221 B
Swift
13 lines
221 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func foo(optional: Int?) {
|
|
_ = { [value = optional ?? 0]
|
|
in
|
|
_ = value
|
|
}
|
|
|
|
_ = [1].map { [number = optional ?? 1] value -> String in
|
|
return number.description
|
|
}
|
|
}
|