From: Christoph Hack Date: Tue, 8 Apr 2008 15:10:36 +0000 (+0200) Subject: merged X-Git-Tag: 2.0rc1~207 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fdbefac97bc785dda674de08a75991902fda106f;p=jinja2.git merged --HG-- branch : trunk --- fdbefac97bc785dda674de08a75991902fda106f diff --cc jinja2/compiler.py index a1e8783,5c64699..c26c1b2 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@@ -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)