Skip to content

Commit ee7c32b

Browse files
committed
Correct one more test
1 parent bacf214 commit ee7c32b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Concurrency/transfernonsendable_nonisolatedunsafe.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ func closureTests() async {
10081008
func testWithTaskDetached() async {
10091009
let x1 = NonSendableKlass()
10101010
Task.detached { _ = x1 } // expected-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1011-
// expected-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}}
1011+
// expected-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}}
10121012
Task.detached { _ = x1 } // expected-note {{access can happen concurrently}}
10131013

10141014
nonisolated(unsafe) let x2 = NonSendableKlass()
@@ -1023,7 +1023,7 @@ func closureTests() async {
10231023
nonisolated(unsafe) let x4a = NonSendableKlass()
10241024
let x4b = NonSendableKlass()
10251025
Task.detached { _ = x4a; _ = x4b } // expected-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1026-
// expected-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}}
1026+
// expected-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}}
10271027
Task.detached { _ = x4a; _ = x4b } // expected-note {{access can happen concurrently}}
10281028
}
10291029
}

0 commit comments

Comments
 (0)