mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-19 14:23:13 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user