Files
swift-mirror/test/SILGen/global_actor_function_mangling.swift
Doug Gregor 351cee31bb [Mangling] Don't mangle global actor types in declarations.
We'll get a real mangling soon; this is a temporary hack.
2021-03-17 16:58:30 -07:00

10 lines
381 B
Swift

// RUN: %target-swift-frontend -emit-silgen %s -module-name test -swift-version 5 -enable-experimental-concurrency | %FileCheck %s
// REQUIRES: concurrency
// Declarations don't mangle global actor types.
// CHECK: @$s4test10returnsOptyxycSgAClF
func returnsOpt<R>(_ fn: (@MainActor () -> R)?) -> (() -> R)? {
typealias Fn = (() -> R)?
return unsafeBitCast(fn, to: Fn.self)
}