From ff5a0f3bd78bacb279d85a91a516b927fe15a5c4 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Sat, 30 Oct 2010 18:54:59 +0200 Subject: [PATCH] fixes #438 :: scope attribute broke with dmdfe 1.062 upgrade; thanks to SiegeLord --- dmd/statement.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dmd/statement.c b/dmd/statement.c index d8e6d05a..dbee1e0a 100644 --- a/dmd/statement.c +++ b/dmd/statement.c @@ -4155,7 +4155,12 @@ Statement *TryFinallyStatement::syntaxCopy() Statement *TryFinallyStatement::semantic(Scope *sc) { //printf("TryFinallyStatement::semantic()\n"); + // This code is different in LDC because LDC needs to know the + // enclosingScopeExit for its labels + Statement* oldScopeExit = sc->enclosingScopeExit; + sc->enclosingScopeExit = this; body = body->semantic(sc); + sc->enclosingScopeExit = oldScopeExit; sc = sc->push(); sc->enclosingFinally = this; sc->sbreak = NULL;