Skip to content

Commit b2dc6e5

Browse files
committed
Unbreak the test
1 parent 0258ed3 commit b2dc6e5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

validation-test/compiler_crashers_2_fixed/sr12723.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,41 @@ func cContext() {
3535
let c = SR12723_C { app in app() }
3636

3737
proxy(c.function)
38-
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
38+
// expected-error@-1 {{converting non-escaping value to '@convention(c) () -> Void' may allow it to escape}}
39+
// expected-error@-2 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
3940

4041
let _ : (@convention(block) () -> Void) -> Void = c.function
41-
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
42+
// expected-error@-1 {{converting non-escaping value to '@convention(c) () -> Void' may allow it to escape}}
43+
// expected-error@-2 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
4244

4345
let _ : (@convention(c) () -> Void) -> Void = c.function // OK
4446

4547
let _ : (@convention(thin) () -> Void) -> Void = c.function // OK
4648

4749
let _ : (() -> Void) -> Void = c.function
48-
// expected-error@-1 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
50+
// expected-error@-1 {{converting non-escaping value to '@convention(c) () -> Void' may allow it to escape}}
51+
// expected-error@-2 {{cannot convert value of type '(@convention(c) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
4952

5053
}
5154

5255
func thinContext() {
5356
let thin = SR12723_Thin { app in app() }
5457

5558
proxy(thin.function)
56-
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
59+
// expected-error@-1 {{converting non-escaping value to '@convention(thin) () -> Void' may allow it to escape}}
60+
// expected-error@-2 {{cannot convert value of type '(@escaping @convention(thin) () -> Void) -> Void' to expected argument type '(() -> Void) -> Void'}}
5761

5862
let _ : (@convention(block) () -> Void) -> Void = thin.function
59-
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
63+
// expected-error@-1 {{converting non-escaping value to '@convention(thin) () -> Void' may allow it to escape}}
64+
// expected-error@-2 {{cannot convert value of type '(@escaping @convention(thin) () -> Void) -> Void' to specified type '(@convention(block) () -> Void) -> Void'}}
6065

6166
let _ : (@convention(c) () -> Void) -> Void = thin.function // OK
6267

6368
let _ : (@convention(thin) () -> Void) -> Void = thin.function // OK
6469

6570
let _ : (() -> Void) -> Void = thin.function
66-
// expected-error@-1 {{cannot convert value of type '(@convention(thin) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
71+
// expected-error@-1 {{converting non-escaping value to '@convention(thin) () -> Void' may allow it to escape}}
72+
// expected-error@-2 {{cannot convert value of type '(@escaping @convention(thin) () -> Void) -> Void' to specified type '(() -> Void) -> Void'}}
6773
}
6874

6975
func blockContext() {

0 commit comments

Comments
 (0)