mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-15 20:33:14 +01:00
Always call finalizer for stack classes. Checking for the number of
destructors of the class type is not sufficient: we may be holding a derived class with a destructor. Fixes: run/auto_07
This commit is contained in:
@@ -1520,8 +1520,7 @@ DValue* DeleteExp::toElem(IRState* p)
|
||||
}
|
||||
else if (DVarValue* vv = dval->isVar()) {
|
||||
if (vv->var && vv->var->onstack) {
|
||||
if (tc->sym->dtors.dim > 0)
|
||||
DtoFinalizeClass(dval->getRVal());
|
||||
DtoFinalizeClass(dval->getRVal());
|
||||
onstack = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user