Skip to content
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

Misleading error message when trying to eta-expand method with more than 22 parameters #7299

Closed
scabug opened this issue Mar 25, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Mar 25, 2013

An attempt to eta-expand a method with more than 22 parameters fails as expected (because there is no corresponding FunctionXY class) but the error message is misleading:

$ scala
Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_15).
Type in expressions to have them evaluated.
Type :help for more information.

scala> def f(a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int) = 0
f: (a1: Int, a2: Int, a3: Int, a4: Int, a5: Int, a6: Int, a7: Int, a8: Int, a9: Int, a10: Int, a11: Int, a12: Int, a13: Int, a14: Int, a15: Int, a16: Int, a17: Int, a18: Int, a19: Int, a20: Int, a21: Int, a22: Int, a23: Int)Int

scala> (f _)
<console>:9: error: missing arguments for method f;
follow this method with `_' if you want to treat it as a partially applied function
              (f _)
               ^
@scabug
Copy link
Author

scabug commented Mar 25, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7299?orig=1
Reporter: @szeiger
Affected Versions: 2.10.0

@scabug
Copy link
Author

scabug commented Mar 25, 2013

@retronym said:
scala/scala#2306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants