Commit 4942e2b7 authored by samaingw's avatar samaingw Committed by Xavier Thompson

Fix inherited inplace operators infering to base class type

parent 1192f591
......@@ -11676,6 +11676,8 @@ class NumBinopNode(BinopNode):
if cpp_type is None and (type2.is_cpp_class or type2.is_ptr):
cpp_type = type2.find_cpp_operation_type(operator, type1)
# FIXME: do we need to handle other cases here?
if self.inplace and type1.is_subclass(cpp_type):
cpp_type = type1
return cpp_type
def may_be_none(self):
......
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