Commit 6ad1f3cf authored by Tom Niget's avatar Tom Niget

Fix returnless function detection for generators

parent df182cfb
...@@ -53,6 +53,7 @@ class ScoperExprVisitor(ScoperVisitor): ...@@ -53,6 +53,7 @@ class ScoperExprVisitor(ScoperVisitor):
assert ftype.kind == PromiseKind.TASK assert ftype.kind == PromiseKind.TASK
ftype.kind = PromiseKind.GENERATOR ftype.kind = PromiseKind.GENERATOR
ftype.return_type.unify(ytype) ftype.return_type.unify(ytype)
self.scope.function.has_return = True
return TY_NONE return TY_NONE
......
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