diff sema/ScopeBuilder.d @ 149:393a1f47a6d2

For loops in AST and sema. Should have correct scope and such now.
author Anders Johnsen <skabet@gmail.com>
date Mon, 21 Jul 2008 21:00:20 +0200
parents a14ac9e5c858
children 57b0b4464a0b
line wrap: on
line diff
--- a/sema/ScopeBuilder.d	Mon Jul 21 20:28:11 2008 +0200
+++ b/sema/ScopeBuilder.d	Mon Jul 21 21:00:20 2008 +0200
@@ -418,6 +418,14 @@
         pop(sc);
     }
 
+    override void visitForStmt(ForStmt s)
+    {
+        s.env = current();
+        auto sc = push();
+        super.visitForStmt(s);
+        pop(sc);
+    }
+
     override void visitCompoundStmt(CompoundStatement s)
     {
         s.env = current();