Files
swift-mirror/validation-test/compiler_crashers_2_fixed/issue-53454.swift

30 lines
571 B
Swift

// RUN: %target-swift-frontend -emit-ir %s
// https://github.com/apple/swift/issues/53454
struct MyText<V> {
let label: String
let value: V
}
extension MyText where V == Void {
init(_ label: String, defaulted: Int = 17) {
self.label = label
self.value = ()
}
}
struct ImagePulse {
@Inspectable(control: { MyText("duration") })
var test: Double = 0
}
@propertyWrapper
final class Inspectable<Value> {
var wrappedValue: Value
init<V>(wrappedValue initialValue: Value, control: @escaping () -> V) {
self.wrappedValue = initialValue
}
}