File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ let foo: @escaping (Int) -> Int // expected-error{{@escaping attribute may only
75
75
76
76
struct GenericStruct < T> { }
77
77
78
- func misuseEscaping( _ a: @escaping Int ) { } // expected-error{{@escaping attribute only applies to function types}}
79
- func misuseEscaping( _ a: ( @escaping Int ) ? ) { } // expected-error{{@escaping attribute only applies to function types}}
78
+ func misuseEscaping( _ a: @escaping Int ) { } // expected-error{{@escaping attribute only applies to function types}} {{26-38=}}
79
+ func misuseEscaping( _ a: ( @escaping Int ) ? ) { } // expected-error{{@escaping attribute only applies to function types}} {{27-39=}}
80
+ func misuseEscaping( opt a: @escaping ( ( Int ) -> Int ) ? ) { } // expected-error{{@escaping attribute only applies to function types}} {{28-38=}}
81
+ // expected-note@-1{{closure is already escaping in optional type argument}}
80
82
81
83
func misuseEscaping( _ a: ( @escaping ( Int ) -> Int ) ? ) { } // expected-error{{@escaping attribute may only be used in function parameter position}} {{27-37=}}
82
84
// expected-note@-1{{closure is already escaping in optional type argument}}
You can’t perform that action at this time.
0 commit comments