|
1 | | -// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix complete- -verify-additional-prefix typechecker-only- -DTYPECHECKER_ONLY %s -o /dev/null -disable-region-based-isolation-with-strict-concurrency |
2 | | -// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix tns- %s -o /dev/null |
| 1 | +// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix complete- -verify-additional-prefix typechecker-only- -DTYPECHECKER_ONLY %s -o /dev/null -disable-region-based-isolation-with-strict-concurrency -enable-upcoming-feature GlobalActorIsolatedTypesUsability |
| 2 | +// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix tns- %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability |
3 | 3 |
|
4 | 4 | // This run validates that for specific test cases around closures, we properly |
5 | 5 | // emit errors in the type checker before we run sns. This ensures that we know that |
6 | 6 | // these cases can't happen when SNS is enabled. |
7 | 7 | // |
8 | | -// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix typechecker-only- -DTYPECHECKER_ONLY %s -o /dev/null |
| 8 | +// RUN: %target-swift-frontend -emit-sil -strict-concurrency=complete -disable-availability-checking -verify -verify-additional-prefix typechecker-only- -DTYPECHECKER_ONLY %s -o /dev/null -enable-upcoming-feature GlobalActorIsolatedTypesUsability |
9 | 9 |
|
10 | 10 | // REQUIRES: concurrency |
11 | 11 | // REQUIRES: asserts |
|
15 | 15 | //////////////////////// |
16 | 16 |
|
17 | 17 | /// Classes are always non-sendable, so this is non-sendable |
18 | | -class NonSendableKlass { // expected-complete-note 49{{}} |
19 | | - // expected-typechecker-only-note @-1 4{{}} |
20 | | - // expected-tns-note @-2 2{{}} |
| 18 | +class NonSendableKlass { // expected-complete-note 51{{}} |
| 19 | + // expected-typechecker-only-note @-1 3{{}} |
| 20 | + // expected-tns-note @-2 {{}} |
21 | 21 | var field: NonSendableKlass? = nil |
22 | 22 |
|
23 | 23 | init() {} |
@@ -1544,6 +1544,8 @@ func functionArgumentIntoClosure(_ x: @escaping () -> ()) async { |
1544 | 1544 | let _ = { @MainActor in |
1545 | 1545 | let _ = x // expected-tns-warning {{sending 'x' risks causing data races}} |
1546 | 1546 | // expected-tns-note @-1 {{task-isolated 'x' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses}} |
| 1547 | + // expected-complete-warning @-2 {{capture of 'x' with non-sendable type '() -> ()' in a `@Sendable` closure}} |
| 1548 | + // expected-complete-note @-3 {{a function type must be marked '@Sendable' to conform to 'Sendable'}} |
1547 | 1549 | } |
1548 | 1550 | } |
1549 | 1551 |
|
|
0 commit comments