module 0x8675309::M { struct S has copy, drop { f: u64, g: u64 } fun id(r: &T): &T { r } fun id_mut(r: &mut T): &mut T { r } fun t0(cond: bool, _other: &mut S) { let s = S { f: 0, g: 0 }; let f; if (cond) f = &s.f else f = &s.g; move s; *f; } fun t1(cond: bool, other: &mut S) { let s = S { f: 0, g: 0 }; let f; if (cond) f = &mut s.f else f = &mut other.f; move s; *f; } fun t2(cond: bool, other: &mut S) { let s = S { f: 0, g: 0 }; let f; if (cond) f = &mut s else f = other; move s; *f; } fun t3(cond: bool, other: &mut S) { let s = S { f: 0, g: 0 }; let f; if (cond) f = id_mut(&mut s) else f = other; move s; *f; } fun t4(cond: bool, _other: &mut S) { let s = S { f: 0, g: 0 }; let f = &s.f; if (cond) { move s; }; *f; } }