Skip to content

Commit b2a9027

Browse files
committed
Force the mangled name of MainActor.run to not include the Sendable constraint.
This API already shipped without the Sendable constraint, and adding the constraint (while it's fine with the compiler) changed the mangled name of this API. Use `@_silgen_name` to restore the old existing mangled name so we don't break the ABI. Fixes rdar://83644760.
1 parent fc58596 commit b2a9027

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/Concurrency/MainActor.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import Swift
4545
@available(SwiftStdlib 5.5, *)
4646
extension MainActor {
4747
/// Execute the given body closure on the main actor.
48+
@_silgen_name("$sScM3run10resultType4bodyxxm_xyYbKScMYcXEtYaKlFZ")
4849
public static func run<T: Sendable>(
4950
resultType: T.Type = T.self,
5051
body: @MainActor @Sendable () throws -> T

0 commit comments

Comments
 (0)