Commit cb1a3809 authored by samaingw's avatar samaingw

Fix inherited inplace operators infering to base class type

parent 57715c18
......@@ -11535,6 +11535,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