mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Start moving the testsuite to the "_ = foo()" idiom for evaluating an
expression but ignoring its value. This is the right canonical way to do this. NFC, just testsuite changes. Swift SVN r28638
This commit is contained in:
@@ -74,7 +74,7 @@ func castToClass(object: Any) -> SomeArbitraryClass? {
|
||||
getAnyObject().map(castToClass) // expected-error{{function signature '(Any) -> SomeArbitraryClass?' is not compatible with expected type 'AnyObject -> SomeArbitraryClass?'}} expected-note {{use a closure to safely wrap calls to the function}} {{20-20={ }} {{31-31=($0) }}}
|
||||
|
||||
|
||||
let _ = { (_: Any) -> Void in // expected-error {{function signature 'Any -> Void' is not compatible with expected type '(Int) -> Void'}}
|
||||
_ = { (_: Any) -> Void in // expected-error {{function signature 'Any -> Void' is not compatible with expected type '(Int) -> Void'}}
|
||||
return
|
||||
} as ((Int) -> Void)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user