module B { struct T{g: u64} public new(g: u64): V#Self.T { return T{g: move(g)}; } public t(this: &V#Self.T) { let g: &u64; let y: u64; g = &move(this).g; y = *move(g); assert(copy(y) == 2, 42); return; } } //! new-transaction module A { import Transaction.B; struct T{f: V#B.T} public new(f: V#B.T): V#Self.T { return T{f: move(f)}; } public t(this: &V#Self.T) { let f: &V#B.T; f = &move(this).f; B.t(move(f)); return; } } //! new-transaction import {{default}}.A; import {{default}}.B; main() { let b: V#B.T; let x: V#A.T; let x_ref: &V#A.T; b = B.new(2); x = A.new(move(b)); x_ref = &x; A.t(move(x_ref)); return; }