You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func testConsumingUseAfterConsumeError(_ x:consumingKlass)async{ // expected-error {{'x' consumed more than once}}
53
+
func testConsumingUseAfterConsumeError(_ x:consumingKlass)async{ // expected-error {{'x' used after consume}}
54
54
awaitconsumeTransferToMain(x) // expected-warning {{sending 'x' risks causing data races}}
55
55
// expected-note @-1 {{sending task-isolated 'x' to main actor-isolated global function 'consumeTransferToMain' risks causing data races between main actor-isolated and task-isolated uses}}
56
56
// expected-note @-2 {{consumed here}}
57
57
print(x)
58
-
// expected-note @-1 {{consumed again here}}
58
+
// expected-note @-1 {{used here}}
59
59
}
60
60
61
-
@CustomActorfunc testConsumingUseAfterConsumeErrorGlobalActor(_ x:consumingKlass)async{ // expected-error {{'x' consumed more than once}}
61
+
@CustomActorfunc testConsumingUseAfterConsumeErrorGlobalActor(_ x:consumingKlass)async{ // expected-error {{'x' used after consume}}
62
62
awaitconsumeTransferToMain(x) // expected-warning {{sending 'x' risks causing data races}}
63
63
// expected-note @-1 {{sending global actor 'CustomActor'-isolated 'x' to main actor-isolated global function 'consumeTransferToMain' risks causing data races between main actor-isolated and global actor 'CustomActor'-isolated uses}}
0 commit comments