mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Re-introduce glue layer closure building error.
This reverts part of b15ffe2ef0
,
and fixes 'fail_compilation/fail10666'.
This commit is contained in:
parent
829839be4a
commit
b40969b660
1 changed files with 6 additions and 0 deletions
|
@ -449,6 +449,12 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
VarDeclaration *vd = *I;
|
VarDeclaration *vd = *I;
|
||||||
|
|
||||||
|
if (needsClosure && vd->needsAutoDtor()) {
|
||||||
|
// This should really be a front-end, not a glue layer error,
|
||||||
|
// but we need to fix this in DMD too.
|
||||||
|
vd->error("has scoped destruction, cannot build closure");
|
||||||
|
}
|
||||||
|
|
||||||
LLValue* gep = DtoGEPi(frame, 0, vd->ir.irLocal->nestedIndex, vd->toChars());
|
LLValue* gep = DtoGEPi(frame, 0, vd->ir.irLocal->nestedIndex, vd->toChars());
|
||||||
if (vd->isParameter()) {
|
if (vd->isParameter()) {
|
||||||
Logger::println("nested param: %s", vd->toChars());
|
Logger::println("nested param: %s", vd->toChars());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue