Skip to content

Commit 016854e

Browse files
committed
Apply Garrics patch
1 parent b366268 commit 016854e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/attr/attr_escaping.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ let foo: @escaping (Int) -> Int // expected-error{{@escaping attribute may only
7575

7676
struct GenericStruct<T> {}
7777

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}}
8082

8183
func misuseEscaping(_ a: (@escaping (Int) -> Int)?) {} // expected-error{{@escaping attribute may only be used in function parameter position}} {{27-37=}}
8284
// expected-note@-1{{closure is already escaping in optional type argument}}

0 commit comments

Comments
 (0)