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
overloadedEach(self, closure) // expected-error {{invalid conversion from non-escaping function of type '@autoclosure () -> ()' to potentially escaping function type '() -> ()'}}
58
+
// expected-note@-1{{parameter 'closure' is implicitly non-escaping because it was declared @autoclosure}}
59
+
60
+
overloadedEach(self, closure) // expected-error {{passing non-escaping parameter 'closure' to function expecting an @escaping closure}}
59
61
}
60
62
}
61
63
@@ -87,7 +89,9 @@ class Sub : Super {
87
89
func func12_sink(_ x:@escaping()->Int){}
88
90
89
91
func func12a(_ x:@autoclosure()->Int){
90
-
func12_sink(x) // expected-error{{invalid conversion from non-escaping function of type '@autoclosure () -> Int' to potentially escaping function type '() -> Int'}}
92
+
// expected-note@-1{{parameter 'x' is implicitly non-escaping because it was declared @autoclosure}}
93
+
94
+
func12_sink(x) // expected-error {{passing non-escaping parameter 'x' to function expecting an @escaping closure}}
doesEscape(fn) // expected-error {{invalid conversion from non-escaping function of type '() -> Int' to potentially escaping function type '() -> Int'}}
36
+
doesEscape(fn) // expected-error {{passing non-escaping parameter 'fn' to function expecting an @escaping closure}}
0 commit comments