Commit a408929b authored by Xavier Thompson's avatar Xavier Thompson

Let ctuples not automatically infer to PyObject

parent 441bea80
...@@ -587,6 +587,10 @@ def safe_spanning_type(types, might_overflow, pos, scope): ...@@ -587,6 +587,10 @@ def safe_spanning_type(types, might_overflow, pos, scope):
return result_type return result_type
elif result_type.is_memoryviewslice: elif result_type.is_memoryviewslice:
return result_type return result_type
elif resolved_result_type.is_ctuple:
# Since structs are considered safe, and ctuples are essentially structs
# with tuple-like syntax, they should be safe for the same reasons.
return result_type
# TODO: double complex should be OK as well, but we need # TODO: double complex should be OK as well, but we need
# to make sure everything is supported. # to make sure everything is supported.
elif (resolved_result_type.is_int or resolved_result_type.is_enum) and not might_overflow: elif (resolved_result_type.is_int or resolved_result_type.is_enum) and not might_overflow:
......
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