Detect missing parent in clone at compile time
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2511
Reported by Martin Stjernholm mast@roxen.com
Consider the following program:
class X {
int i;
class Y {int f() {return i;}}
}
int main() {
X.Y y = X.Y();
}
It will compile, but will fail at run time with "Parent lost, cannot clone program". Besides the somewhat misleading error message, I think this case ought to be catched already at compile time.