-
Notifications
You must be signed in to change notification settings - Fork 7
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
Get rid of CheckedType::UnknownType
#143
Comments
If I understood @hediet correctly, |
Better having an explicit UnknownType than having TypeRefs which point to nothing. Either way, you need to panic if something is wrong (calling expect on the result of a type lookup or asserting unreachable for UnknownTypes). I strongly prefer the UnknownType variant. |
While looking through the code I couldn't figure out a way to get rid of this. A |
What would an "optimal" solution look like? As long as we construct CheckedTypes for possibly invalid types, we need to consider that these CheckedTypes actually may represent invalid types. |
Removing the |
In my opinion there should be just a second typesystem struct that is "into()"ed at the end of the semantic analysis phase that has all this impossible states removed. |
In my opinion there should also be a second ast for that. |
You are actually right. Most of the impossible states are in the ast. @hediet what are you thinking of exactly? A reshaped ast with typesystem information on each node? |
@reiner-dolp yes, exactly. |
otherwise, to get exhaustive enum matches, we need to take care of this, wherever we match on
CheckedType
See #141 (comment)
The text was updated successfully, but these errors were encountered: