blob: 9834044c2b368e0185ba672c46b5806e81b7e141 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
struct Foo(x:Int)
func update(f:&Foo)
f.x += 1
struct Baz(foo:Foo)
func update(b:&Baz)
# Make sure & propagates here!
b.foo.update()
func main()
b := Baz(Foo(123))
b.update()
assert b.foo.x == 124
|