mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
9 lines
268 B
Swift
9 lines
268 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 4 -experimental-one-way-closure-params
|
|
|
|
func testBasic() {
|
|
let _: (Float) -> Float = { $0 + 1 }
|
|
|
|
let _ = { $0 + 1 } // expected-error{{cannot infer type of closure parameter '$0' without a type annotation}}
|
|
}
|
|
|