micropython/ast.py | raw changeset files shortlog |
1.1 --- a/micropython/ast.py Sat Nov 08 23:11:45 2008 +0100 1.2 +++ b/micropython/ast.py Mon Nov 10 21:38:58 2008 +0100 1.3 @@ -1668,7 +1668,7 @@ 1.4 def visitFrom(self, node): pass 1.5 1.6 def visitFunction(self, node): 1.7 - if not node.unit.referenced and not node.unit.is_method(): 1.8 + if not node.unit.referenced and (not node.unit.is_method() or not node.unit.parent.has_key(node.unit.name)): 1.9 return 1.10 1.11 # Only store the name when visiting this node from outside.