Skip to content

Commit 452333f

Browse files
committed
[region-isolation] Remove expected-complete-warning from a test. It is dead.
(cherry picked from commit 3aee7da)
1 parent 198685c commit 452333f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

test/Concurrency/concurrent_value_checking.swift

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// REQUIRES: asserts
77

88
class NotConcurrent { } // expected-note 13{{class 'NotConcurrent' does not conform to the 'Sendable' protocol}}
9-
// expected-complete-note @-1 13{{class 'NotConcurrent' does not conform to the 'Sendable' protocol}}
109
// expected-tns-allow-typechecker-note @-2 {{class 'NotConcurrent' does not conform to the 'Sendable' protocol}}
1110

1211
// ----------------------------------------------------------------------
@@ -67,23 +66,23 @@ actor A2 {
6766
}
6867

6968
func testActorCreation(value: NotConcurrent) async {
70-
_ = A2(value: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
69+
_ = A2(value: value)
7170
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
7271
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(value:)' risks causing data races between actor-isolated and task-isolated uses}}
7372

74-
_ = await A2(valueAsync: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
73+
_ = await A2(valueAsync: value)
7574
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
7675
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(valueAsync:)' risks causing data races between actor-isolated and task-isolated uses}}
7776

78-
_ = A2(delegatingSync: value) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
77+
_ = A2(delegatingSync: value)
7978
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
8079
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(delegatingSync:)' risks causing data races between actor-isolated and task-isolated uses}}
8180

82-
_ = await A2(delegatingAsync: value, 9) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
81+
_ = await A2(delegatingAsync: value, 9)
8382
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
8483
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(delegatingAsync:_:)' risks causing data races between actor-isolated and task-isolated uses}}
8584

86-
_ = await A2(nonisoAsync: value, 3) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent' into actor-isolated context may introduce data races}}
85+
_ = await A2(nonisoAsync: value, 3)
8786
// expected-tns-warning @-1 {{sending 'value' risks causing data races}}
8887
// expected-tns-note @-2 {{sending task-isolated 'value' to actor-isolated initializer 'init(nonisoAsync:_:)' risks causing data races between actor-isolated and task-isolated uses}}
8988
}
@@ -104,7 +103,7 @@ extension A1 {
104103
// expected-warning@-1 {{expression is 'async' but is not marked with 'await'}}
105104
// expected-note@-2 {{property access is 'async'}}
106105
_ = await other.synchronous() // expected-warning{{non-sendable type 'NotConcurrent?' returned by call to actor-isolated function cannot cross actor boundary}}
107-
_ = await other.asynchronous(nil) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into actor-isolated context may introduce data races}}
106+
_ = await other.asynchronous(nil)
108107
}
109108
}
110109

@@ -142,8 +141,8 @@ func globalTest() async {
142141
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
143142
// expected-note@+1 {{property access is 'async'}}
144143
let a = globalValue // expected-warning{{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated let 'globalValue' cannot cross actor boundary}}
145-
await globalAsync(a) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
146-
await globalSync(a) // expected-complete-warning{{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
144+
await globalAsync(a)
145+
await globalSync(a)
147146

148147
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
149148
// expected-note@+1 {{property access is 'async'}}
@@ -154,7 +153,7 @@ func globalTest() async {
154153
// expected-typechecker-note@+2 {{call is 'async'}}
155154
// expected-typechecker-note@+1 {{property access is 'async'}}
156155
globalAsync(E.notSafe)
157-
// expected-complete-warning@-1 {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
156+
158157
// expected-typechecker-warning@-2 {{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated static property 'notSafe' cannot cross actor boundary}}
159158
#endif
160159
}
@@ -178,9 +177,9 @@ func globalTestMain(nc: NotConcurrent) async {
178177
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
179178
// expected-note@+1 {{property access is 'async'}}
180179
let a = globalValue // expected-warning {{non-sendable type 'NotConcurrent?' in implicitly asynchronous access to global actor 'SomeGlobalActor'-isolated let 'globalValue' cannot cross actor boundary}}
181-
await globalAsync(a) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
182-
await globalSync(a) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent?' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
183-
_ = await ClassWithGlobalActorInits(nc) // expected-complete-warning {{passing argument of non-sendable type 'NotConcurrent' into global actor 'SomeGlobalActor'-isolated context may introduce data races}}
180+
await globalAsync(a)
181+
await globalSync(a)
182+
_ = await ClassWithGlobalActorInits(nc)
184183
// expected-warning @-1 {{non-sendable type 'ClassWithGlobalActorInits' returned by call to global actor 'SomeGlobalActor'-isolated function cannot cross actor boundary}}
185184
// expected-tns-warning @-2 {{sending 'nc' risks causing data races}}
186185
// expected-tns-note @-3 {{sending main actor-isolated 'nc' to global actor 'SomeGlobalActor'-isolated initializer 'init(_:)' risks causing data races between global actor 'SomeGlobalActor'-isolated and main actor-isolated uses}}

0 commit comments

Comments
 (0)