-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Incorrect error message when not specifying curryed vararg parameters #14567
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
Labels
Comments
This was fixed recently
|
Then we should add a regression test |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 12, 2022
nicolasstucki
added a commit
that referenced
this issue
Mar 14, 2022
Regression test to show that #14567 is fixed
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 12, 2023
A unary varargs method sits between nullary methods that sometimes get a () argument inferred (i.e. for methods coming from Java) and other methods that can be eta expanded. The safest strategy for them is to do neither, and expect either an explicit expected function type, or an explicit argument. That's also what Scala 2 does. Fixes scala#16820 Reclassifies scala#14567 to be a neg test (with the error message suggested in the original issue for scala#14567)
odersky
added a commit
that referenced
this issue
Feb 19, 2023
A unary varargs method sits between nullary methods that sometimes get a () argument inferred (i.e. for methods coming from Java) and other methods that can be eta expanded. The safest strategy for them is to do neither, and expect either an explicit expected function type, or an explicit argument. That's also what Scala 2 does. Fixes #16820 Reclassifies #14567 to be a neg test (with the error message suggested in the original issue for #14567)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Compiler version
3.1.1
Minimized code & Output
Expectation
Notify the user that the argument list for
xs
is mandatory instead of telling them that the type cannot be inferred.The text was updated successfully, but these errors were encountered: