struct C[T] { public mutable x : int; public foo () : void { x++; } public bar () : void { foo (); } public baz (other : C[T]) : void { this = other; } } def c = C (); assert (c.x == 0); c.bar(); assert (c.x == 1); c.bar(); assert (c.x == 2); def q = C (); q.baz (c); assert (q.x == 2); /* BEGIN-OUTPUT END-OUTPUT */