-
Notifications
You must be signed in to change notification settings - Fork 55
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
Parser: do not define typedefs with invalid types #647
Conversation
Looks like the zig compiler is crashing; happens on master for me as well:
|
Wouldn't it be better to allow redefinitions if the previous type is invalid? Since there was already a hit it should be in the slow path as well. Also I'm going to look into the crash now. |
Master branch is green so this should be unblocked. |
Do not try to combine invalid types into typedefs or render error messages with invalid types. Closes Vexu#645
@Vexu I forced pushed - is this what you had in mind by allowing redefinitions of invalid types? I believe they were always allowed; it's just that we issue an error diagnostic. So now I skip the diagnostic if the previous typedef was an invalid type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what you had in mind by allowing redefinitions of invalid types? I believe they were always allowed; it's just that we issue an error diagnostic. So now I skip the diagnostic if the previous typedef was an invalid type.
It is.
Putting invalid typedefs into the symbol table is problematic because if they get redefined, we try to render the original type (not possible for invalid types) for the error message.
Closes #645