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
func r19763676Callee(_ f:@noescape(_ param:Int)->Int){} // expected-warning{{@noescape is the default and is deprecated}} {{27-37=}}
207
209
208
-
func r19763676Caller(_ g:@noescape(Int)->Int){
210
+
func r19763676Caller(_ g:@noescape(Int)->Int){ // expected-warning{{@noescape is the default and is deprecated}} {{27-37=}}
209
211
r19763676Callee({ _ ing(1)})
210
212
}
211
213
212
214
213
215
// <rdar://problem/19763732> False positive in @noescape analysis triggered by default arguments
214
216
func calleeWithDefaultParameters(_ f:@noescape()->(), x :Int=1){} // expected-warning {{closure parameter prior to parameters with default arguments will not be treated as a trailing closure}}
217
+
// expected-warning@-1{{@noescape is the default and is deprecated}} {{39-49=}}
215
218
216
-
func callerOfDefaultParams(_ g:@noescape()->()){
219
+
func callerOfDefaultParams(_ g:@noescape()->()){ // expected-warning{{@noescape is the default and is deprecated}} {{33-43=}}
func reduce<Result>(_ initial:Result, _ combine:@noescape(Result,r19997577Type)->Result)->Result{ // expected-warning{{@noescape is the default and is deprecated}} {{53-63=}}
300
+
letbinary:@noescape(r19997577Type,r19997577Type)->Result={combine(combine(combine(initial,self), $0), $1)} // expected-warning{{@noescape is the default and is deprecated}} {{17-27=}}
295
301
switchself{
296
302
case.Unit:
297
303
returncombine(initial,self)
@@ -305,9 +311,13 @@ enum r19997577Type {
305
311
306
312
// type attribute and decl attribute
307
313
func noescapeD(@noescape f:@escaping()->Bool){} // expected-error {{@noescape is now an attribute on a parameter type, instead of on the parameter itself}} {{16-25=}} {{29-29=@noescape }}
308
-
func noescapeT(f:@noescape()->Bool){} // ok
314
+
func noescapeT(f:@noescape()->Bool){} // expected-warning{{@noescape is the default and is deprecated}} {{19-29=}}
309
315
func autoclosureD(@autoclosure f:()->Bool){} // expected-error {{@autoclosure is now an attribute on a parameter type, instead of on the parameter itself}} {{19-31=}} {{35-35=@autoclosure }}
310
316
func autoclosureT(f:@autoclosure()->Bool){} // ok
311
317
312
318
func noescapeD_noescapeT(@noescape f:@noescape()->Bool){} // expected-error {{@noescape is now an attribute on a parameter type, instead of on the parameter itself}}
319
+
// expected-warning@-1{{@noescape is the default and is deprecated}} {{39-49=}}
320
+
313
321
func autoclosureD_noescapeT(@autoclosure f:@noescape()->Bool){} // expected-error {{@autoclosure is now an attribute on a parameter type, instead of on the parameter itself}} {{29-41=}} {{45-45=@autoclosure }}
322
+
// expected-warning@-1{{@noescape is the default and is deprecated}} {{45-55=}}
0 commit comments