Commit 71930383 authored by Robert Bradshaw's avatar Robert Bradshaw

Use assignable_from for conditional node

Fixes

cdef int a, b
cdef int *foo = &a if a else &b
parent ee65439e
......@@ -2805,6 +2805,10 @@ class CondExprNode(ExprNode):
return type1
elif type1.is_pyobject or type2.is_pyobject:
return py_object_type
elif type1.assignable_from(type2):
return type1
elif type2.assignable_from(type1):
return type2
else:
return None
......
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