Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0202-rdar53183030.swift
2019-07-19 10:30:36 -07:00

22 lines
515 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
protocol MyBindableObject {}
@propertyWrapper
struct MyBinding<T> where T : MyBindableObject {
public var wrappedV: T
public var wrapperValue: MyBinding<T> {
return self
}
public init(initialValue: T) {
self.value = initialValue
}
}
class BeaconDetector: MyBindableObject {
struct ContentView {
@MyBinding var detector = BeaconDetector()
func foo() {
_ = detector.undefined == 1
}
}
}