import crack.io cout;
class A {
A other = null;
String name;
oper init(A other0, String name0) : other = other0, name = name0 {}
oper del() { cout `deleting $name\n`; }
}
A a = A(null, 'first');
a = A(a, 'second');
cout `done\n`;
Should print "done", "first" and "second". Instead, "first" gets cleaned up
during the assignment.
Cleanups for assignments need to happen after the value is bound.
Original issue reported on code.google.com by mind...@gmail.com on 27 Jul 2010 at 3:11
Original issue reported on code.google.com by
mind...@gmail.com
on 27 Jul 2010 at 3:11