mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
6 lines
329 B
Swift
6 lines
329 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 3
|
|
|
|
func foo(fn: (() -> ()) -> ()) {
|
|
fn { fn {} } // expected-warning {{passing a closure which captures a non-escaping function parameter 'fn' to a call to a non-escaping function parameter can allow re-entrant modification of a variable and will be illegal in Swift 4}}
|
|
}
|