class Model {
@MakeComputed
var x: Int = 0 {
didSet {
print(_x) // Instance member '_x' cannot be used on type 'Model'; did you mean to use a value of this type instead?
}
}
init(x: Int) {
self._x = x
}
}
Expected behavior
The above code compiles and prints the value of x when the property observer is triggered.
Description
Expected behavior The above code compiles and prints the value of
x
when the property observer is triggered.Environment Xcode 15b1
swift-macro-examples.zip