Commit bb3dfdb4 authored by Stefan Behnel's avatar Stefan Behnel

fix type inference for ResultRefNode

parent b723ea4f
...@@ -141,6 +141,9 @@ class ResultRefNode(AtomicExprNode): ...@@ -141,6 +141,9 @@ class ResultRefNode(AtomicExprNode):
def infer_type(self, env): def infer_type(self, env):
if self.expression is not None: if self.expression is not None:
return self.expression.infer_type(env) return self.expression.infer_type(env)
if self.type is not None:
return self.type
assert False, "cannot infer type of ResultRefNode"
def may_be_none(self): def may_be_none(self):
if not self.type.is_pyobject: if not self.type.is_pyobject:
......
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