Skip to content

Fix #2495: Improve error message #3804

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

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@allanrenucci
Copy link
Contributor

I think we should would avoid using REPL scripted tests to test error messages. It is very fragile. We'll have to fix the tests every time we change pretty printing, change the wording of the message...

@nicolasstucki
Copy link
Contributor Author

The idea of this test is to show that the pretty printed version looks as expected. This is the best that can be done for this issue. The alternative is not testing it.

@allanrenucci
Copy link
Contributor

Yeah, I don't think this deserves a test.

My opinion for error messages is to test that the right error message is emitted and that it contains the right semantic information (if any). But not test how it is pretty printed.

I'll leave the last word to @smarter 😄

@allanrenucci allanrenucci requested review from smarter and removed request for allanrenucci January 11, 2018 16:01
@allanrenucci allanrenucci removed their assignment Jan 11, 2018
@nicolasstucki
Copy link
Contributor Author

I will remove it, it will be partially tested by the old scripted test.

@nicolasstucki nicolasstucki assigned smarter and unassigned smarter Jan 11, 2018
@nicolasstucki nicolasstucki requested review from liufengyun and removed request for smarter January 15, 2018 14:28
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM.

|The argument types of an anonymous function must be fully known. (SLS 8.5)"""
i"""missing parameter type
|
|The argument types of an anonymous function must be fully known. (SLS 8.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to have this general reference at the end, and put more specific information before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of the missing parameter type explaination.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also follows the old format in scalac that users said was clearer.

@nicolasstucki nicolasstucki merged commit cd87360 into scala:master Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants