You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vars5:String=(ns ??"str")asString // fixed version
299
299
}
300
300
301
+
// Make sure more complicated cast has correct parenthesization
302
+
func castMoreComplicated(anInt:Int?){
303
+
let _:(NSObject&NSCopying)?= anInt // expected-error{{cannot convert value of type 'Int?' to specified type '(NSObject & NSCopying)?'}}{{41-41= as (NSObject & NSCopying)?}}
304
+
}
305
+
306
+
301
307
// <rdar://problem/19813772> QoI: Using as! instead of as in this case produces really bad diagnostic
302
308
func rdar19813772(_ nsma:NSMutableArray){
303
309
vara1= nsma as!Array // expected-error{{generic parameter 'Element' could not be inferred in cast to 'Array'}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{26-26=<Any>}}
0 commit comments