Commit 7e656716 authored by Stefan Behnel's avatar Stefan Behnel

'type inference' for special temp nodes

parent d8cc99c7
...@@ -127,6 +127,9 @@ class ResultRefNode(AtomicExprNode): ...@@ -127,6 +127,9 @@ class ResultRefNode(AtomicExprNode):
def analyse_types(self, env): def analyse_types(self, env):
self.type = self.expression.type self.type = self.expression.type
def infer_type(self, env):
return self.expression.infer_type(env)
def result(self): def result(self):
return self.result_code return self.result_code
...@@ -192,6 +195,9 @@ class EvalWithTempExprNode(ExprNodes.ExprNode, LetNodeMixin): ...@@ -192,6 +195,9 @@ class EvalWithTempExprNode(ExprNodes.ExprNode, LetNodeMixin):
self.pos = subexpression.pos self.pos = subexpression.pos
self.subexpression = subexpression self.subexpression = subexpression
def infer_type(self, env):
return self.subexpression.infer_type(env)
def result(self): def result(self):
return self.subexpression.result() return self.subexpression.result()
......
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