assignments are traversed in the correct order now
--HG--
branch : trunk
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index 48c9d99..65912c7 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -160,6 +160,11 @@
"""Macros set local."""
self.identifiers.declared_locally.add(node.name)
+ def visit_Assign(self, node):
+ """Visit assignments in the correct order."""
+ self.visit(node.node)
+ self.visit(node.target)
+
# stop traversing at instructions that have their own scope.
visit_Block = visit_CallBlock = visit_FilterBlock = \
visit_For = lambda s, n: None