-
Notifications
You must be signed in to change notification settings - Fork 1.1k
On invalid prefix, throw a TypeError #18061
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
Conversation
Previously, the type was set to UnspecifiedErrorType. But that violates the rule that every ErrorType has to be reported. If that does not happen, crashes in pickler will result.
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.
Should type G = (f: _ <: F) => f.A
not be able to compile?
I don't think it should compile. |
The test case goes through typedFunctionType's typedDependent, which encodes the function as a RefinedTypeTree, using an approximate AppliedTypeTree refined by the more specific param-dependant type. For Other that that, my change was to avoid a compiler crash caused by an assertion error. I see now that using a TypeError makes the whole So I think perhaps this should compile, but not crashing in pickling is progress. |
We could widen to |
Thanks for the prompt fix! |
Previously, the type was set to UnspecifiedErrorType. But that violates the rule that every ErrorType has to be reported. If that does not happen, crashes in pickler will result.
Fixes #18058