Files
swift-mirror/test/embedded/failable-crash.swift
2025-07-01 11:43:43 +01:00

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{{.*}}(