Merge pull request #427 from AlexeyProkhin/issue426

Fixed issue #426 — dtor / destructor not called for (rvalue) struct used in opApply
This commit is contained in:
Kai Nacke
2013-07-20 11:19:07 -07:00
6 changed files with 167 additions and 65 deletions

View File

@@ -1073,7 +1073,7 @@ void DtoVarDeclaration(VarDeclaration* vd)
{
vd->ir.irLocal->value = val;
}
goto Lexit;
return;
}
}
}
@@ -1105,15 +1105,6 @@ void DtoVarDeclaration(VarDeclaration* vd)
ex->exp->toElem(gIR);
}
}
Lexit:
/* Mark the point of construction of a variable that needs to be destructed.
*/
if (vd->edtor && !vd->noscope)
{
// Put vd on list of things needing destruction
gIR->varsInScope().push_back(vd);
}
}
DValue* DtoDeclarationExp(Dsymbol* declaration)