diff dmd/ProtDeclaration.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 7e0d548de9e6
children 50ebb404ddd9 b17640f0e4e8
line wrap: on
line diff
--- a/dmd/ProtDeclaration.d	Sun Aug 29 14:39:08 2010 +0100
+++ b/dmd/ProtDeclaration.d	Mon Aug 30 03:57:51 2010 +0200
@@ -29,6 +29,25 @@
 		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);
+
+        if (newsc !is sc)
+           newsc.pop();
+    }
+    
     override void setScope(Scope sc)
 	{
 		if (decl)