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
[region-isolation] Remove variable_defined_here from named use after transfer error.
This is just a pseudo-why are these two things part of the same region error. I
am going to remove this for now and the proper form of this diagnostic will come
back when I land the region history functionality.
Copy file name to clipboardExpand all lines: test/Concurrency/sendable_checking.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ final class NonSendable {
274
274
275
275
@available(SwiftStdlib 5.1,*)
276
276
func testNonSendableBaseArg()async{
277
-
lett=NonSendable() // expected-tns-note {{variable defined here}}
277
+
lett=NonSendable()
278
278
await t.update()
279
279
// expected-targeted-and-complete-warning @-1 {{passing argument of non-sendable type 'NonSendable' into main actor-isolated context may introduce data races}}
280
280
// expected-tns-warning @-2 {{transferring 't' may cause a race}}
letns1=NonSendableKlass() // expected-tns-note {{variable defined here}}
168
+
letns1=NonSendableKlass()
169
169
170
170
contents = ns0
171
171
contents = ns1
@@ -298,7 +298,7 @@ extension Actor {
298
298
}
299
299
300
300
func simpleClosureCaptureSelfWithReinit3()async{
301
-
varclosure:()->()={} // expected-tns-note {{variable defined here}}
301
+
varclosure:()->()={}
302
302
303
303
// We get a transfer after use error.
304
304
awaittransferToMain(closure) // expected-complete-warning {{passing argument of non-sendable type '() -> ()' into main actor-isolated context may introduce data races}}
@@ -498,7 +498,7 @@ extension Actor {
498
498
499
499
extensionActor{
500
500
func testVarReassignStopActorDerived()async{
501
-
varclosure:()->()={ // expected-tns-note {{variable defined here}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
847
+
vartest=StructFieldTests()
848
848
test =StructFieldTests()
849
849
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
850
850
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
857
+
vartest=StructFieldTests()
858
858
test =StructFieldTests()
859
859
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
860
860
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
867
+
vartest=StructFieldTests()
868
868
test =StructFieldTests()
869
869
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
870
870
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
924
+
vartest=StructFieldTests()
925
925
test =StructFieldTests()
926
926
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
927
927
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
934
+
vartest=StructFieldTests()
935
935
test =StructFieldTests()
936
936
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
937
937
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
vartest=StructFieldTests() // expected-tns-note {{variable defined here}}
944
+
vartest=StructFieldTests()
945
945
test =StructFieldTests()
946
946
awaittransferToMain(test) // expected-tns-warning {{transferring 'test' may cause a race}}
947
947
// expected-tns-note @-1 {{'test' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
0 commit comments