//# publish module 0x1.B { struct T has drop {g: u64} public new(g: u64): Self.T { label b0: return T{g: move(g)}; } public t(this: &Self.T) { let g: &u64; let y: u64; label b0: g = &move(this).T::g; y = *move(g); assert(copy(y) == 2, 42); return; } } //# publish module 0x1.A { import 0x1.B; struct T has drop {f: B.T} public new(f: B.T): Self.T { label b0: return T{f: move(f)}; } public t(this: &Self.T) { let f: &B.T; label b0: f = &move(this).T::f; B.t(move(f)); return; } } //# run import 0x1.A; import 0x1.B; main() { let b: B.T; let x: A.T; let x_ref: &A.T; label b0: b = B.new(2); x = A.new(move(b)); x_ref = &x; A.t(move(x_ref)); return; }