mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
427 B
Swift
20 lines
427 B
Swift
// RUN: %target-swift-emit-ir %s -module-name=main -enable-experimental-feature Embedded | %FileCheck %s
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
public func test() {
|
|
_ = MyClass<String>(x: 42)
|
|
}
|
|
|
|
public class MyClass<T> {
|
|
private let member: Int
|
|
|
|
public init?(x: Int) {
|
|
guard x > 0 else { return nil }
|
|
self.member = 42
|
|
}
|
|
}
|
|
|
|
// CHECK: define {{.*}}@{{_*}}main{{.*}}(
|