Commit aa5a3cca authored by Tom Niget's avatar Tom Niget

Update return detection

parent acfcb8fd
......@@ -124,11 +124,11 @@ class BlockVisitor(NodeVisitor):
def visit_ClassDef(self, node: ast.ClassDef):
yield from ()
has_return = ReturnVisitor().match(node.body)
def check(self, f):
for b in node.body:
yield from self.match(node)
for child in node.body:
from transpiler.phases.emit_cpp.function import FunctionVisitor
child_visitor = FunctionVisitor(inner_scope, CoroutineMode.ASYNC)
has_return = next(ReturnVisitor().check(node), False)
yield from self.visit_func_decls(node.body, inner_scope)
......
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