# HG changeset patch # User Trass3r # Date 1283182782 -7200 # Node ID 50ebb404ddd9a1ee3428e7eb2eb1d860a5ee529f # Parent 8e69d041a99d25b090582c737c6cd5f3669d49a5 fixed Ticket 1 diff -r 8e69d041a99d -r 50ebb404ddd9 dmd/ProtDeclaration.d --- a/dmd/ProtDeclaration.d Mon Aug 30 16:16:30 2010 +0100 +++ b/dmd/ProtDeclaration.d Mon Aug 30 17:39:42 2010 +0200 @@ -28,26 +28,26 @@ pd = new ProtDeclaration(protection, Dsymbol.arraySyntaxCopy(decl)); return pd; } - - override void importAll(Scope sc) - { - Scope newsc = sc; - if (sc.protection != protection || sc.explicitProtection != 1) - { - // create new one for changes - newsc = new Scope(sc); - newsc.flags &= ~SCOPE.SCOPEfree; - newsc.protection = protection; - newsc.explicitProtection = 1; - } - foreach (Dsymbol s; decl) - s.importAll(newsc); + override void importAll(Scope sc) + { + Scope newsc = sc; + if (sc.protection != protection || sc.explicitProtection != 1) + { + // create new one for changes + newsc = sc.clone(); + newsc.flags &= ~SCOPE.SCOPEfree; + newsc.protection = protection; + newsc.explicitProtection = 1; + } - if (newsc !is sc) - newsc.pop(); - } - + foreach (Dsymbol s; decl) + s.importAll(newsc); + + if (newsc !is sc) + newsc.pop(); + } + override void setScope(Scope sc) { if (decl)