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
[silgen] Refactor out how we compute the actor isolation for a SILFunction so we can reuse it in other contexts.
I also want to extend it and did not want to have to copy/paste this code into
multiple places.
The small test tweak occurs since I changed the initializer SILGen emission code
to set the declref field of SILFunctions to the actual decl ref which we did not
before. So we got a more specific diagnostic.
Copy file name to clipboardExpand all lines: test/Concurrency/transfernonsendable.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1763,7 +1763,7 @@ extension MyActor {
1763
1763
_ = sc
1764
1764
1765
1765
Task{ // expected-tns-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1766
-
// expected-tns-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code}}
1766
+
// 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}}
Copy file name to clipboardExpand all lines: test/Concurrency/transfernonsendable_typed_errors.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ extension MyActor {
60
60
_ = sc
61
61
62
62
Task{ // expected-error {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
63
-
// expected-note @-1 {{Passing value of non-Sendable type '() async -> ()' as a 'sending' argument risks causing races in between local and caller code}}
63
+
// expected-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}}
0 commit comments