From f12b95b36a9b61de138070b5c8ed4a8fe8e31cb6 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Sun, 19 Dec 2010 10:20:06 +0300 Subject: [PATCH] Fixed many issues with nested structs and classes --- dmd2/expression.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dmd2/expression.c b/dmd2/expression.c index 08b76a66..70531721 100644 --- a/dmd2/expression.c +++ b/dmd2/expression.c @@ -129,8 +129,11 @@ Expression *getRightThis(Loc loc, Scope *sc, AggregateDeclaration *ad, //printf("rewriting e1 to %s's this\n", f->toChars()); n++; - // LDC seems dmd misses it sometimes here :/ - //f->vthis->nestedrefs = 1; + // LDC seems dmd misses it sometimes here :/ + if (f->isMember2()) { + f->vthis->nestedrefs.push(sc->parent->isFuncDeclaration()); + f->closureVars.push(f->vthis); + } e1 = new VarExp(loc, f->vthis); }