-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Attempt at fixing Applications.scala:95
#1589
#3780
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
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.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Have an awesome day! ☀️
I signed the CLA. Should I open a new PR ? |
@aesteve You can update the PR (e.g. by force push), and it will re-trigger the CI. |
9692824
to
b072494
Compare
|The return type of an extractor should be chosen as follows: | ||
| - If it is just a test, return a ${"Boolean"}. For instance ${"case even()"} | ||
| - If it returns a single sub-value of type ${s"$resultClassName"}, return an ${s"Option[$resultClassName]"} | ||
| - If you want to return several sub-values ${"T1,...,Tn"}, group them in an optional tuple ${"Option[(T1,...,Tn)]"}. |
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.
This is not telling the full story, we also need to mention option-less pattern matching
and talk about unapplySeq.
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.
I believe unapplySeq
has been deprecated in #3747
By the way, this is a duplicate of #3501. |
I believe a lot more work needs to be done on good unapply error messages. That work has to be in the Typer checker, which has to become better at finding root causes of unapply errors. Adding a fixed error message for the failure would make things more complicated at the present time |
First try at implementing an error message, please tell me if I'm doing a mistake in some way.
Especially :
val kind = "Reference"
the right kind of errorexplain
partunapplySeq
?Thanks a lot for the review.