File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -392,3 +392,20 @@ extension CurriedClass {
392
392
method3 ( self ) // expected-error {{missing argument for parameter 'b' in call}}
393
393
}
394
394
}
395
+
396
+
397
+ // <rdar://problem/19870975> Incorrect diagnostic for failed member lookups within closures passed as arguments ("(_) -> _")
398
+ func ident< T> ( t: T ) -> T { }
399
+ var c = ident ( { 1 . DOESNT_EXIST} ) // error: expected-error {{cannot invoke 'ident' with an argument list of type '(() -> _)'}}
400
+ //expected-note @-1 {{expected an argument list of type '(T)'}}
401
+
402
+ // <rdar://problem/20712541> QoI: Int/UInt mismatch produces useless error inside a block
403
+ var afterMessageCount : Int ? = nil
404
+
405
+ func uintFunc( ) -> UInt { }
406
+ func takeVoidVoidFn( a : ( ) -> ( ) ) { }
407
+ takeVoidVoidFn { ( ) -> Void in // expected-error {{cannot invoke 'takeVoidVoidFn' with an argument list of type '(() -> Void)'}}
408
+ // expected-note @-1 {{expected an argument list of type '(() -> ())'}}
409
+ afterMessageCount = uintFunc ( )
410
+ }
411
+
You can’t perform that action at this time.
0 commit comments