-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Some usability improvements relating to errors #23370
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
We now assume that all members of the empty package are meant to be used alone or in projects without separate compilation. So the warning that an inferred type does not conform to a type seen in separate compilation is dropped because it was a hassle for experimentation.
Aligning an expected function type to be dependent gives the false expression that we could have the parameter in a local capture. To avoid that misinterpretation, convert an aligned dependent function as the expected type back to a generic functions before displaying it in the error message.
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.
LGTM!
One next step, I guess, is to explain box adaptation errors without "actually" talking about boxes.
@odersky it was a fun session, wasn’t it? Happy to do that again if we get the chance! |
@nrinaudo Can you contact me at |
The changes in this PR were motivated by a very nice live coding session of Nicolas Rinaudo at the Scala User's group meetup in Krakow. We identified 4 areas where the feed-back of the compiler could be clearer:
Int^
should give an error.