Skip to content

Commit 2850b65

Browse files
committed
Simplify implementation and fix a test
1 parent 5f9721c commit 2850b65

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

stdlib/public/Concurrency/MainActor.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ extension MainActor {
6767
resultType: T.Type = T.self,
6868
body: @MainActor @Sendable () throws -> T
6969
) async rethrows -> T {
70-
@MainActor func runOnMain(body: @MainActor @Sendable () throws -> T) rethrows -> T {
71-
return try body()
72-
}
73-
74-
return try await runOnMain(body: body)
70+
return try await body()
7571
}
7672
}

test/api-digester/stability-concurrency-abi.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@
5050
// UNSUPPORTED: swift_evolve
5151

5252
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)
53+
Func MainActor.run(resultType:body:) has generic signature change from <T where T : Swift.Sendable> to <T>
5354
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)