Commits

Armin Rigo committed 8a74260

Syntax test and fix, part 1.

  • Participants
  • Parent commits 0d36011

Comments (0)

Files changed (2)

pypy/interpreter/astcompiler/asthelpers.py

         if self.elts:
             for elt in self.elts:
                 elt.set_context(ctx)
-            self.ctx = ctx
+        self.ctx = ctx
 
 
 class __extend__(ast.Attribute):

pypy/interpreter/astcompiler/test/test_compiler.py

         source = "for x in y: pass\n" * 1000
         compile_with_astcompiler(source, 'exec', self.space)
 
+    def test_assign_to_empty_list_1(self):
+        source = """if 1:
+        for i in range(5):
+            del []
+            [] = ()
+            [] = []
+            [] = [] = []
+        ok = 1
+        """
+        self.simple_test(source, 'ok', 1)
+
 
 class AppTestCompiler: