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
Copy file name to clipboardExpand all lines: test/Concurrency/transfernonsendable.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1767,7 +1767,7 @@ extension MyActor {
1767
1767
_ = sc
1768
1768
1769
1769
Task{ // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1770
-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to initializer 'init(priority:operation:)' risks causing races in between local and caller code}}
1770
+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to initializer 'init(name:priority:operation:)' risks causing races in between local and caller code}}
Task.detached{ x =1} // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1978
-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(priority:operation:)' risks causing races in between local and caller code}}
1978
+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(name:priority:operation:)' risks causing races in between local and caller code}}
1979
1979
1980
1980
x =2 // expected-tns-note {{access can happen concurrently}}
Task.detached{ x =1} // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1988
-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(priority:operation:)' risks causing races in between local and caller code}}
1988
+
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument to static method 'detached(name:priority:operation:)' risks causing races in between local and caller code}}
1989
1989
1990
1990
print(x) // expected-tns-note {{access can happen concurrently}}
0 commit comments