Fix problem with withstat fix
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 13 Feb 2009 18:04:14 +0000 (19:04 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 13 Feb 2009 18:04:14 +0000 (19:04 +0100)
Cython/Compiler/TreeFragment.py

index 27b43f705e337e4fe29ed4f4f5b828cf7b689a72..47e98b7f925ea76a252b1bb256b7f125c4a943ce 100644 (file)
@@ -160,8 +160,7 @@ class TemplateTransform(VisitorTransform):
     def visit_NameNode(self, node):
         temphandle = self.tempmap.get(node.name)
         if temphandle:
-            node.name = temphandle
-            return node
+            return NameNode(pos=node.pos, name=temphandle)
             # Replace name with temporary
             #return temphandle.ref(self.get_pos(node))
         else: