Skip to content

tuple-zipped.scala: support for case-syntax of lambda arguments #684

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
DarkDimius opened this issue Jun 24, 2015 · 1 comment
Closed

tuple-zipped.scala: support for case-syntax of lambda arguments #684

DarkDimius opened this issue Jun 24, 2015 · 1 comment

Comments

@DarkDimius
Copy link
Contributor

[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:27: error: wrong number of parameters, expected: 2
[info]       val sum1 = (cc1, cc2).zipped map { case (x, y) => x + y } sum
[info]                                        ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:27: error: type mismatch:
[info]  found   : Nothing(x)
[info]  required: ?{ + : ? }
[info] Note that implicit conversions cannot be applied because they are ambiguous;
[info]  both method Character2char in object Predef$ and method Byte2byte in object Predef$ convert from Nothing(x) to ?{ + : FunProto(<y:Nothing>):Nothing' }
[info]       val sum1 = (cc1, cc2).zipped map { case (x, y) => x + y } sum
[info]                                                         ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:27: error: ambiguous implicits: both object FloatIsFractional in object Numeric$ and object ByteIsIntegral in object Numeric$ match type scala.math.Numeric[Nothing'] of parameter num of method sum in trait TraversableOnce
[info]       val sum1 = (cc1, cc2).zipped map { case (x, y) => x + y } sum
[info]                                                                    ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:34: error: wrong number of parameters, expected: 3
[info]       val sum1 = (cc1, cc2, cc3).zipped map { case (x, y, z) => x + y + z } sum
[info]                                             ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:34: error: type mismatch:
[info]  found   : Nothing(x)
[info]  required: ?{ + : ? }
[info] Note that implicit conversions cannot be applied because they are ambiguous;
[info]  both method Character2char in object Predef$ and method Byte2byte in object Predef$ convert from Nothing(x) to ?{ + : FunProto(<y:Nothing>):?{ + : FunProto(<z:Nothing>):Nothing' } }
[info]       val sum1 = (cc1, cc2, cc3).zipped map { case (x, y, z) => x + y + z } sum
[info]                                                                 ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/tuple-zipped.scala:34: error: ambiguous implicits: both object FloatIsFractional in object Numeric$ and object ByteIsIntegral in object Numeric$ match type scala.math.Numeric[Nothing'] of parameter num of method sum in trait TraversableOnce
[info]       val sum1 = (cc1, cc2, cc3).zipped map { case (x, y, z) => x + y + z } sum
[info]                                                                                ^
[info] three warnings found
@smarter
Copy link
Member

smarter commented Nov 18, 2015

Fixed by #887, leaving this open until we move this test out of pending.

smarter added a commit to dotty-staging/dotty that referenced this issue Feb 8, 2016
smarter added a commit to dotty-staging/dotty that referenced this issue Feb 9, 2016
@odersky odersky closed this as completed Feb 20, 2016
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

3 participants