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
// expected-error@-2 {{could not find imported function 'CImplFuncMissing' matching global function 'CImplFuncMissing'; make sure your umbrella or bridging header imports the header that declares it}}
480
480
}
481
481
482
+
@_objcImplementation@_cdecl("CImplFuncMismatch1")
483
+
func CImplFuncMismatch1(_:Float){
484
+
// expected-warning@-1 {{global function 'CImplFuncMismatch1' of type '(Float) -> ()' does not match type '(Int32) -> Void' declared by the header}}
485
+
}
486
+
487
+
@_objcImplementation@_cdecl("CImplFuncMismatch2")
488
+
func CImplFuncMismatch2(_:Int32)->Float{
489
+
// expected-warning@-1 {{global function 'CImplFuncMismatch2' of type '(Int32) -> Float' does not match type '(Int32) -> Void' declared by the header}}
490
+
}
491
+
492
+
@_objcImplementation@_cdecl("CImplFuncMismatch3")
493
+
func CImplFuncMismatch3(_:Any?){
494
+
// OK
495
+
}
496
+
497
+
@_objcImplementation@_cdecl("CImplFuncMismatch4")
498
+
func CImplFuncMismatch4(_:Any){
499
+
// expected-warning@-1 {{global function 'CImplFuncMismatch4' of type '(Any) -> ()' does not match type '(Any?) -> Void' declared by the header}}
// expected-error@-2 {{could not find imported function 'CImplFuncNameMismatch1' matching global function 'mismatchedName1'; make sure your umbrella or bridging header imports the header that declares it}}
536
+
// FIXME: Improve diagnostic for a partial match.
537
+
}
538
+
539
+
@_objcImplementation@_cdecl("mismatchedName2")
540
+
func CImplFuncNameMismatch2(_:Int32){
541
+
// expected-error@-2 {{could not find imported function 'mismatchedName2' matching global function 'CImplFuncNameMismatch2'; make sure your umbrella or bridging header imports the header that declares it}}
0 commit comments