Skip to content

Commit 2e06769

Browse files
committed
Revert "Fix an error message due to a difference in Task.detached from 6.2 and main."
This reverts commit b81f6bb.
1 parent 5ba72f2 commit 2e06769

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
@@ -1010,7 +1010,7 @@ func closureTests() async {
10101010
func testWithTaskDetached() async {
10111011
let x1 = NonSendableKlass()
10121012
Task.detached { _ = x1 } // expected-warning {{sending value of non-Sendable type '() async -> ()' risks causing data races}}
1013-
// 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}}
1013+
// 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}}
10141014
Task.detached { _ = x1 } // expected-note {{access can happen concurrently}}
10151015

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

0 commit comments

Comments
 (0)