Commit a3acb0ff authored by Robert Bradshaw's avatar Robert Bradshaw

Let the span of error types be object again.

This partially revert the change introduced in
767fce81.

Turns out AttributeNodes always start with type error, which we
don't want to propagate in some places.
parent 73e89124
...@@ -554,7 +554,8 @@ def safe_spanning_type(types, might_overflow, pos, scope): ...@@ -554,7 +554,8 @@ def safe_spanning_type(types, might_overflow, pos, scope):
# to make sure everything is supported. # to make sure everything is supported.
elif (result_type.is_int or result_type.is_enum) and not might_overflow: elif (result_type.is_int or result_type.is_enum) and not might_overflow:
return result_type return result_type
elif not result_type.can_coerce_to_pyobject(scope): elif (not result_type.can_coerce_to_pyobject(scope)
and not result_type.is_error):
return result_type return result_type
return py_object_type return py_object_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