Files
swift-mirror/test/Concurrency/Inputs/hoptomainactorifneeded_interpreter.swift
Michael Gottesman 0e0665bfbd [concurrency] Add support for HopToMainActorIfNeededThunk.
It is behind the experimental flag GenerateForceToMainActorThunks.
2024-10-17 13:31:39 -07:00

7 lines
142 B
Swift

public func useClosure(_ x: @escaping @MainActor () -> ()) {
typealias Func = () -> ()
let x2 = unsafeBitCast(x, to: Func.self)
x2()
}