Skip to content

Commit 026f173

Browse files
committed
[send-non-sendable] Update concurrency tests so that we run them in all concurrency modes as appropriate.
This means that: 1. In test cases where minimal is the default (swift 5 without -warn-concurrency), I added RUN lines for targeted, complete, and complete + sns. 2. In test cases where complete is the default (swift 6, -warn-concurrency, specified complete with -strict-concurrency), I added a send non-sendable run line. In each of these cases, I added additional expected-* lines as appropriate so the tests can compile in each mode successfully.
1 parent fa1558a commit 026f173

File tree

95 files changed

+623
-232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+623
-232
lines changed

test/Concurrency/LLDBDebuggerFunctionActorExtension.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -debugger-support
1+
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
// This test simulates LLDB's expression evaluator making an otherwise illegal

test/Concurrency/actor_call_implicitly_async.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -warn-concurrency -parse-as-library
1+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-
2+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
3+
24
// REQUIRES: concurrency
35

46

@@ -289,8 +291,8 @@ func blender(_ peeler : () -> Void) {
289291

290292

291293
await wisk({})
292-
// expected-warning@-1{{passing argument of non-sendable type '() -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
293-
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
294+
// expected-complete-warning@-1{{passing argument of non-sendable type '() -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
295+
// expected-complete-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
294296
await wisk(1)
295297
await (peelBanana)()
296298
await (((((peelBanana)))))()
@@ -300,15 +302,15 @@ func blender(_ peeler : () -> Void) {
300302
// expected-warning@-1 2{{converting function value of type '@BananaActor () -> ()' to '() -> Void' loses global actor 'BananaActor'}}
301303

302304
await wisk(peelBanana)
303-
// expected-warning@-1{{passing argument of non-sendable type '() -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
304-
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
305+
// expected-complete-warning@-1{{passing argument of non-sendable type '() -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
306+
// expected-complete-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
305307

306308
await wisk(wisk)
307-
// expected-warning@-1{{passing argument of non-sendable type '(Any) -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
308-
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
309+
// expected-complete-warning@-1{{passing argument of non-sendable type '(Any) -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
310+
// expected-complete-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
309311
await (((wisk)))(((wisk)))
310-
// expected-warning@-1{{passing argument of non-sendable type '(Any) -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
311-
// expected-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
312+
// expected-complete-warning@-1{{passing argument of non-sendable type '(Any) -> ()' into global actor 'BananaActor'-isolated context may introduce data races}}
313+
// expected-complete-note@-2{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
312314

313315
await {wisk}()(1)
314316

test/Concurrency/actor_defer.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// RUN: %target-swift-frontend -parse-as-library -emit-sil -DNEGATIVES -verify %s
2+
// RUN: %target-swift-frontend -parse-as-library -emit-sil -DNEGATIVES -verify %s -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -parse-as-library -emit-sil -DNEGATIVES -verify %s -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -parse-as-library -emit-sil -DNEGATIVES -verify %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enable-actor-data-race-checks -o - %s | %FileCheck %s
37

48
// REQUIRES: concurrency

test/Concurrency/actor_derived_conformances.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking
1+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
actor A1: Comparable {}

test/Concurrency/actor_existentials.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking
1+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
protocol P: Actor {

test/Concurrency/actor_inout_isolation.swift

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking
1+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix minimal-targeted-
2+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix targeted-complete-sns- -verify-additional-prefix targeted-complete- -verify-additional-prefix minimal-targeted- -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix targeted-complete-sns- -verify-additional-prefix targeted-complete- -verify-additional-prefix complete-sns- -verify-additional-prefix complete- -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix targeted-complete-sns- -verify-additional-prefix complete-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
// Verify that we don't allow actor-isolated state to be passed via inout
@@ -96,7 +100,9 @@ extension TestActor {
96100

97101
// external class method call
98102
@available(SwiftStdlib 5.1, *)
99-
class NonAsyncClass {
103+
class NonAsyncClass { // expected-targeted-complete-note {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
104+
// expected-targeted-complete-sns-note @-1 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
105+
// expected-sns-note @-2 {{class 'NonAsyncClass' does not conform to the 'Sendable' protocol}}
100106
func modifyOtherAsync(_ other : inout Int) async {
101107
// ...
102108
}
@@ -114,20 +120,26 @@ extension TestActor {
114120
func passStateIntoDifferentClassMethod() async {
115121
let other = NonAsyncClass()
116122
let otherCurry = other.modifyOtherAsync
117-
// expected-error@+1{{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call}}
123+
// expected-targeted-complete-sns-warning @-1 {{non-sendable type 'NonAsyncClass' exiting actor-isolated context in call to non-isolated instance method 'modifyOtherAsync' cannot cross actor boundary}}
118124
await other.modifyOtherAsync(&value2)
119-
// expected-error@+1{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call}}
125+
// expected-error @-1 {{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call}}
126+
// expected-targeted-complete-warning @-2 {{passing argument of non-sendable type 'NonAsyncClass' outside of actor-isolated context may introduce data races}}
127+
120128
await otherCurry(&value1)
129+
// expected-error @-1 {{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call}}
130+
121131
other.modifyOtherNotAsync(&value2) // This is okay since it's not async!
122132

123133
}
124134

125135
func callMutatingFunctionOnStruct() async {
136+
// expected-targeted-complete-warning @+4 {{passing argument of non-sendable type 'inout Point' outside of actor-isolated context may introduce data races}}
126137
// expected-error@+3:20{{cannot call mutating async function 'setComponents(x:y:)' on actor-isolated property 'position'}}
127138
// expected-error@+2:51{{actor-isolated property 'nextPosition' cannot be passed 'inout' to 'async' function call}}
128139
// expected-error@+1:71{{actor-isolated property 'nextPosition' cannot be passed 'inout' to 'async' function call}}
129140
await position.setComponents(x: &nextPosition.x, y: &nextPosition.y)
130141

142+
// expected-targeted-complete-warning @+4 {{passing argument of non-sendable type 'inout Point' outside of actor-isolated context may introduce data races}}
131143
// expected-error@+3:20{{cannot call mutating async function 'setComponents(x:y:)' on actor-isolated property 'position'}}
132144
// expected-error@+2:38{{actor-isolated property 'value1' cannot be passed 'inout' to 'async' function call}}
133145
// expected-error@+1:50{{actor-isolated property 'value2' cannot be passed 'inout' to 'async' function call}}
@@ -201,20 +213,26 @@ struct MyGlobalActor {
201213
}
202214

203215
@MyGlobalActor var number: Int = 0
204-
// expected-note@-1{{var declared here}}
205-
// expected-note@-2{{var declared here}}
206-
// expected-note@-3{{mutation of this var is only permitted within the actor}}
216+
// expected-note @-1 {{var declared here}}
217+
// expected-note @-2 {{var declared here}}
218+
// expected-note @-3 {{mutation of this var is only permitted within the actor}}
219+
// expected-complete-sns-error @-4 {{top-level code variables cannot have a global actor}}
220+
// expected-complete-sns-note @-5 4{{mutation of this var is only permitted within the actor}}
221+
207222

208-
// expected-error@+3{{actor-isolated var 'number' cannot be passed 'inout' to 'async' function call}}
209-
// expected-error@+2{{global actor 'MyGlobalActor'-isolated var 'number' can not be used 'inout' from a non-isolated context}}
210223
if #available(SwiftStdlib 5.1, *) {
211-
let _ = Task.detached { await { (_ foo: inout Int) async in foo += 1 }(&number) }
224+
let _ = Task.detached { await { (_ foo: inout Int) async in foo += 1 }(&number) }
225+
// expected-error @-1 {{actor-isolated var 'number' cannot be passed 'inout' to 'async' function call}}
226+
// expected-minimal-targeted-error @-2 {{global actor 'MyGlobalActor'-isolated var 'number' can not be used 'inout' from a non-isolated context}}
227+
// expected-complete-sns-error @-3 {{main actor-isolated var 'number' can not be used 'inout' from a non-isolated context}}
212228
}
213229

214230
// attempt to pass global state owned by the global actor to another async function
215-
// expected-error@+2{{actor-isolated var 'number' cannot be passed 'inout' to 'async' function call}}
216231
@available(SwiftStdlib 5.1, *)
217232
@MyGlobalActor func sneaky() async { await modifyAsynchronously(&number) }
233+
// expected-error @-1 {{actor-isolated var 'number' cannot be passed 'inout' to 'async' function call}}
234+
// expected-complete-sns-error @-2 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
235+
218236

219237
// It's okay to pass actor state inout to synchronous functions!
220238

@@ -223,10 +241,13 @@ func globalSyncFunction(_ foo: inout Int) { }
223241
@MyGlobalActor func globalActorSyncFunction(_ foo: inout Int) { }
224242
@available(SwiftStdlib 5.1, *)
225243
@MyGlobalActor func globalActorAsyncOkay() async { globalActorSyncFunction(&number) }
244+
// expected-complete-sns-error @-1 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
226245
@available(SwiftStdlib 5.1, *)
227246
@MyGlobalActor func globalActorAsyncOkay2() async { globalSyncFunction(&number) }
247+
// expected-complete-sns-error @-1 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
228248
@available(SwiftStdlib 5.1, *)
229249
@MyGlobalActor func globalActorSyncOkay() { globalSyncFunction(&number) }
250+
// expected-complete-sns-error @-1 {{main actor-isolated var 'number' can not be used 'inout' from global actor 'MyGlobalActor'}}
230251

231252
// Gently unwrap things that are fine
232253
@available(SwiftStdlib 5.1, *)

test/Concurrency/actor_isolation.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
2+
23
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/OtherActors.swiftmodule -module-name OtherActors %S/Inputs/OtherActors.swift -disable-availability-checking
3-
// RUN: %target-typecheck-verify-swift -I %t -disable-availability-checking -warn-concurrency -parse-as-library
4+
5+
// RUN: %target-swift-frontend -I %t -disable-availability-checking -warn-concurrency -parse-as-library -emit-sil -o /dev/null -verify %s
6+
// RUN: %target-swift-frontend -I %t -disable-availability-checking -warn-concurrency -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable %s
7+
48
// REQUIRES: concurrency
59

610
import OtherActors // expected-remark{{add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'OtherActors'}}{{1-1=@preconcurrency }}

test/Concurrency/actor_isolation_cycle.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4+
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
public protocol P {

test/Concurrency/actor_isolation_objc.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking
1+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37
// REQUIRES: objc_interop
48

test/Concurrency/actor_isolation_swift6.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -warn-concurrency -swift-version 6
1+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -swift-version 6 -emit-sil -o /dev/null -verify %s
2+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -swift-version 6 -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable %s
3+
24
// REQUIRES: concurrency
35
// REQUIRES: asserts
46

test/Concurrency/actor_isolation_unsafe.swift

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking
1+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
3+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-sns- -strict-concurrency=complete
4+
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
5+
26
// REQUIRES: concurrency
37

48
@globalActor
@@ -9,12 +13,14 @@ actor SomeGlobalActor {
913
@MainActor(unsafe) func globalMain() { } // expected-note {{calls to global function 'globalMain()' from outside of its actor context are implicitly asynchronous}}
1014

1115
@SomeGlobalActor(unsafe) func globalSome() { } // expected-note 2{{calls to global function 'globalSome()' from outside of its actor context are implicitly asynchronous}}
16+
// expected-complete-sns-note @-1 {{calls to global function 'globalSome()' from outside of its actor context are implicitly asynchronous}}
1217

1318
// ----------------------------------------------------------------------
1419
// Witnessing and unsafe global actor
1520
// ----------------------------------------------------------------------
1621
protocol P1 {
1722
@MainActor(unsafe) func onMainActor() // expected-note{{mark the protocol requirement 'onMainActor()' 'async' to allow actor-isolated conformances}}
23+
// expected-complete-sns-note @-1 {{mark the protocol requirement 'onMainActor()' 'async' to allow actor-isolated conformances}}
1824
}
1925

2026
struct S1_P1: P1 {
@@ -31,6 +37,7 @@ struct S3_P1: P1 {
3137

3238
struct S4_P1_quietly: P1 {
3339
@SomeGlobalActor func onMainActor() { }
40+
// expected-complete-sns-warning @-1 {{global actor 'SomeGlobalActor'-isolated instance method 'onMainActor()' cannot be used to satisfy main actor-isolated protocol requirement}}
3441
}
3542

3643
@SomeGlobalActor
@@ -42,11 +49,13 @@ struct S4_P1: P1 {
4249
@MainActor(unsafe)
4350
protocol P2 {
4451
func f() // expected-note{{calls to instance method 'f()' from outside of its actor context are implicitly asynchronous}}
52+
// expected-complete-sns-note @-1 {{calls to instance method 'f()' from outside of its actor context are implicitly asynchronous}}
4553
nonisolated func g()
4654
}
4755

4856
struct S5_P2: P2 {
4957
func f() { } // expected-note{{calls to instance method 'f()' from outside of its actor context are implicitly asynchronous}}
58+
// expected-complete-sns-note @-1 {{calls to instance method 'f()' from outside of its actor context are implicitly asynchronous}}
5059
func g() { }
5160
}
5261

@@ -58,9 +67,12 @@ nonisolated func testP2(x: S5_P2, p2: P2) {
5867
}
5968

6069
func testP2_noconcurrency(x: S5_P2, p2: P2) {
61-
p2.f() // okay, not concurrency-related code
70+
// expected-complete-sns-note @-1 2{{add '@MainActor' to make global function 'testP2_noconcurrency(x:p2:)' part of global actor 'MainActor'}}
71+
p2.f() // okay without complete. with targeted/minimal not concurrency-related code.
72+
// expected-complete-sns-error @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
6273
p2.g() // okay
63-
x.f() // okay, not concurrency-related code
74+
x.f() // okay without complete. with targeted/minimal not concurrency-related code
75+
// expected-complete-sns-error @-1 {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
6476
x.g() // OKAY
6577
}
6678

@@ -73,7 +85,8 @@ class C1 {
7385

7486
class C2: C1 {
7587
override func method() { // expected-note 2{{overridden declaration is here}}
76-
globalSome() // okay
88+
globalSome() // okay when not in complete
89+
// expected-complete-sns-error @-1 {{call to global actor 'SomeGlobalActor'-isolated global function 'globalSome()' in a synchronous main actor-isolated context}}
7790
}
7891
}
7992

test/Concurrency/actor_keypath_isolation.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -warn-concurrency
1+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
3+
24
// REQUIRES: concurrency
35

46
class Box { // expected-note 3{{class 'Box' does not conform to the 'Sendable' protocol}}

test/Concurrency/actor_keypath_isolation_swift6.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -warn-concurrency -swift-version 6
1+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -swift-version 6 %s -emit-sil -o /dev/null -verify
2+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -swift-version 6 %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
3+
24
// REQUIRES: concurrency && asserts
35

46
class Box { // expected-note 3{{class 'Box' does not conform to the 'Sendable' protocol}}

0 commit comments

Comments
 (0)