-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in union with a forward reference to a bad type. #4543
Comments
Note: It looks like the crash happens only if there are at least three elements in the union. |
Another possible scenario for this crash is #4653 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code causes a crash:
Here is a traceback:
It looks like the problem is that clearly erroneous types are not wrapped in
ForwardRef
and are not post-processed in third pass. There are two options that I see now forUnboundType
s (maybe there are other):Any
after giving anInvalid type
error (maybe with better error message, but we already have an issue for this.)I would prefer the second option, since this seems simpler and would probably minimize the amount of not useful errors (because of the initially invalid type).
The text was updated successfully, but these errors were encountered: