Commit 8e1f1ddf authored by Tom Niget's avatar Tom Niget

Fix recursion emission for nested functions

parent 0e8c5f1b
......@@ -85,7 +85,8 @@ class ExpressionVisitor(NodeVisitor):
def visit_Name(self, node: ast.Name) -> Iterable[str]:
res = self.fix_name(node.id)
if self.scope.function and (decl := self.scope.get(res)) and decl.type is self.scope.function.obj_type:
res = "(*this)"
if not self.scope.function.parent.function:
res = "(*this)"
#if decl.kind == VarKind.SELF:
# res = "(*this)"
#elif decl.future and CoroutineMode.ASYNC in self.generator:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment