Avatar
@swift-4.2.4 struct Stone { var x: Int { get { return 1 } _modify { var x: Int = 3 yield &x y = x } } var y: Int = 0 } func mod(_ x: inout Int) { x = 8 } func main() { var a = Stone() mod(&a.x) print(a.y) } main()