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:
Chris Lattner
2015-05-15 20:15:54 +00:00
parent 9f4233bdc1
commit e4b6afb9ae
125 changed files with 545 additions and 538 deletions

View File

@@ -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)