We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It looks like it is not possible to create a anonymous function with repeat parameters. The specification does not allow a type followed by a *.
This looks inconsitent to me.
scala> def foo(ss: String*) = println(ss.length) foo: (ss: String*)Unit scala> val bar = foo _ bar: (String*) => Unit = <function1> scala> val doesnotwork = (ss:String*) => println(ss.length) <console>:1: error: ')' expected but identifier found. val doesnotwork = (ss:String*) => println(ss.length)
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-3652?orig=1 Reporter: Michael Kebe (michael.kebe)
Sorry, something went wrong.
@odersky said: This looks tempting at first, but it would drag in a lot of complexity (you just need to believe me on that one).
No branches or pull requests
It looks like it is not possible to create a anonymous function with repeat parameters. The specification does not allow a type followed by a *.
This looks inconsitent to me.
The text was updated successfully, but these errors were encountered: