Commit 6e414031 authored by Stefan Behnel's avatar Stefan Behnel

smarter type analysis in BinopNode: propagate known Python result types

parent fabe1ee5
......@@ -4706,7 +4706,9 @@ class BinopNode(ExprNode):
self.operand2.analyse_types(env)
if self.is_py_operation():
self.coerce_operands_to_pyobjects(env)
self.type = py_object_type
self.type = self.result_type(self.operand1.type,
self.operand2.type)
assert self.type.is_pyobject
self.is_temp = 1
elif self.is_cpp_operation():
self.analyse_cpp_operation(env)
......
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