merged
authorChristoph Hack <christoph@tux21b.org>
Tue, 8 Apr 2008 15:10:36 +0000 (17:10 +0200)
committerChristoph Hack <christoph@tux21b.org>
Tue, 8 Apr 2008 15:10:36 +0000 (17:10 +0200)
--HG--
branch : trunk

1  2 
jinja2/compiler.py
test.py

index a1e878323fa07e35c53a4076bd7ecf7ffcdd724a,5c64699d3b8add67806da9f5b2449aadfd1699cb..c26c1b295808eb4d2aa2fb73e1e7acae9877ba8c
@@@ -118,16 -120,9 +124,16 @@@ class FrameIdentifierVisitor(NodeVisito
          if node.ctx in ('store', 'param'):
              self.identifiers.declared_locally.add(node.name)
          elif node.ctx == 'load':
-             if not self.identifiers.is_declared(node.name):
+             if not self.identifiers.is_declared(node.name, self.hard_scope):
                  self.identifiers.undeclared.add(node.name)
  
 +    def visit_FilterCall(self, node):
 +        if not node.name in self.identifiers.declared_filter:
 +            uf = self.identifiers.undeclared_filter.get(node.name, 0) + 1
 +            if uf > 1:
 +                self.identifiers.declared_filter.add(node.name)
 +            self.identifiers.undeclared_filter[node.name] = uf
 +
      def visit_Macro(self, node):
          """Macros set local."""
          self.identifiers.declared_locally.add(node.name)
diff --cc test.py
Simple merge