Commit 93b894bd authored by Robert Bradshaw's avatar Robert Bradshaw

Fix comparison bug for longs and doubles #208053

parent e75e3530
...@@ -3338,6 +3338,8 @@ class CmpNode: ...@@ -3338,6 +3338,8 @@ class CmpNode:
if (type1.is_extension_type or type2.is_extension_type) \ if (type1.is_extension_type or type2.is_extension_type) \
and not type1.same_as(type2): and not type1.same_as(type2):
common_type = py_object_type common_type = py_object_type
elif type1.is_numeric:
common_type = PyrexTypes.widest_numeric_type(type1, type2)
else: else:
common_type = type1 common_type = type1
code1 = operand1.result_as(common_type) code1 = operand1.result_as(common_type)
......
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