Mercurial > projects > ddmd
diff dmd/DeclarationExp.d @ 79:43073c7c7769
updated to 2.035
also implemented a few missing functions
still crashes in Import.importAll though
author | Trass3r |
---|---|
date | Mon, 30 Aug 2010 03:57:51 +0200 |
parents | ad4792a1cfd6 |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/DeclarationExp.d Sun Aug 29 14:39:08 2010 +0100 +++ b/dmd/DeclarationExp.d Mon Aug 30 03:57:51 2010 +0200 @@ -6,6 +6,7 @@ import dmd.ExpInitializer; import dmd.OutBuffer; import dmd.Loc; +import dmd.STC; import dmd.Scope; import dmd.InlineCostState; import dmd.IRState; @@ -101,7 +102,14 @@ } if (!s.isVarDeclaration()) { - declaration.semantic(sc); + Scope sc2 = sc; + if (sc2.stc & (STC.STCpure | STC.STCnothrow)) + sc2 = sc.push(); + sc2.stc &= ~(STC.STCpure | STC.STCnothrow); + declaration.semantic(sc2); + if (sc2 != sc) + sc2.pop(); + s.parent = sc.parent; } if (!global.errors)