changeset 86:50ebb404ddd9

fixed Ticket 1
author Trass3r
date Mon, 30 Aug 2010 17:39:42 +0200
parents 8e69d041a99d
children 23280d154c5b
files dmd/ProtDeclaration.d
diffstat 1 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- 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)