mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This flag can be used to gradually add the functionility that will allow use of protocol values in embedded mode.
24 lines
562 B
Swift
24 lines
562 B
Swift
// RUN: %target-swift-frontend -enable-experimental-feature EmbeddedExistentials -enable-experimental-feature Embedded -parse-as-library -wmo -emit-sil %s | %FileCheck %s
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: optimized_stdlib
|
|
// REQUIRES: swift_feature_Embedded
|
|
// REQUIRES: swift_feature_EmbeddedExistentials
|
|
|
|
class C {}
|
|
|
|
// CHECK: sil @$e11existential4testyyF
|
|
// CHECK: init_existential_addr
|
|
// CHECK: } // end sil function '$e11existential4testyyF'
|
|
|
|
func test() {
|
|
let any: any Any = C()
|
|
}
|
|
|
|
@main
|
|
struct Main {
|
|
static func main() {
|
|
test()
|
|
}
|
|
}
|