Skip to content

Commit 1307b4b

Browse files
Fix type signature conflict between Swift and C++
`extension` leads generic context and the defined methods have extra generic type parameters, but caller side (C++) doesn't expect such parameters, so their signatures are conflicted.
1 parent 7c8d45e commit 1307b4b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

stdlib/public/Concurrency/Actor.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ internal func _enqueueOnMain(_ job: UnownedJob)
7676

7777
// Used by the concurrency runtime
7878
@available(SwiftStdlib 5.5, *)
79-
extension SerialExecutor {
80-
@_silgen_name("_swift_task_getMainExecutor")
81-
internal func _getMainExecutor() -> UnownedSerialExecutor {
82-
return MainActor.shared.unownedExecutor
83-
}
79+
@_silgen_name("_swift_task_getMainExecutor")
80+
internal func _getMainExecutor() -> UnownedSerialExecutor {
81+
return MainActor.shared.unownedExecutor
8482
}
8583

8684
@available(SwiftStdlib 5.5, *)

0 commit comments

Comments
 (0)