blob: 411eb12654769d2d1592430d652541a74480fec2 [file] [log] [blame]
// 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
}
}
}