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

Currying repeated parameters #7144

Closed
scabug opened this issue Feb 19, 2013 · 2 comments
Closed

Currying repeated parameters #7144

scabug opened this issue Feb 19, 2013 · 2 comments

Comments

@scabug
Copy link

scabug commented Feb 19, 2013

Since Scala 2.10 currying functions with repeated parameters seems to change the repeated parameters into a Seq[] parameter.

Code:
{quote}def doSomething(x: Int)(abc: Int*)(y: Int) = x + abc.sum * y
def doLess = doSomething(0)_{quote}

Output with Scala 2.9.2:
{quote}doSomething: (x: Int)(abc: Int*)(y: Int)Int
doLess: Int* => (Int => Int){quote}

Output with Scala 2.10.0:
{quote}doSomething: (x: Int)(abc: Int*)(y: Int)Int
doLess: Seq[Int] => (Int => Int){quote}

@scabug
Copy link
Author

scabug commented Feb 19, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7144?orig=1
Reporter: Marvin (marvin)
Affected Versions: 2.10.0, 2.10.1-RC1, 2.10.1

@scabug
Copy link
Author

scabug commented Mar 12, 2013

@adriaanm said:
The old behavior was considered a bug. #4176 , fixed in scala/scala#771

@scabug scabug closed this as completed Mar 12, 2013
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

No branches or pull requests

1 participant