1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// xfail-boot fn main() { obj foo() { impure fn m1(mutable int i) { i += 1; log "hi!"; } impure fn m2(mutable int i) { i += 1; self.m1(i); } } auto a = foo(); let int i = 0; a.m1(i); a.m2(i); }