Skip to content

Function5.curried not implemented #6109

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

Closed
liufengyun opened this issue Mar 18, 2019 · 2 comments
Closed

Function5.curried not implemented #6109

liufengyun opened this issue Mar 18, 2019 · 2 comments
Assignees

Comments

@liufengyun
Copy link
Contributor

The following code fails at runt-time:

object Test extends App {
  val f = (x1: Int, x2: Int, x3: Int, x4: Int, x5: Int) => x1 + x2 + x3 + x4 + x5
  println(f.curried(1)(2)(3)(4)(5))
}

curried in Function5 up to Function22 are not implemented.

@odersky
Copy link
Contributor

odersky commented Mar 18, 2019

That's already the case for Scala 2, right?

@liufengyun
Copy link
Contributor Author

@odersky This is a bug encountered in running ScalaTest test suite -- Scala2 works perfectly without runtime errors.

liufengyun added a commit to dotty-staging/dotty that referenced this issue Mar 18, 2019
liufengyun added a commit to dotty-staging/dotty that referenced this issue Mar 18, 2019
smarter added a commit that referenced this issue Mar 19, 2019
Fix #6109: implement FunctionX.curried
@liufengyun liufengyun mentioned this issue Mar 19, 2019
66 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants