Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upType system breach in multiple assignment #5106
Comments
This comment has been minimized.
This comment has been minimized.
Imported From: https://issues.scala-lang.org/browse/SI-5106?orig=1 |
This comment has been minimized.
This comment has been minimized.
@jsalvata said: |
This comment has been minimized.
This comment has been minimized.
@adriaanm said: scala> val (n, l): (String, Int) = (4, "")
<console>:7: error: type mismatch;
found : Int(4)
required: String
val (n, l): (String, Int) = (4, "")
^
<console>:7: error: type mismatch;
found : String("")
required: Int
val (n, l): (String, Int) = (4, "")
^
scala> val (n: String, l: Int) = (4, "");
<console>:7: error: scrutinee is incompatible with pattern type;
found : String
required: Int
val (n: String, l: Int) = (4, "");
^
<console>:7: error: scrutinee is incompatible with pattern type;
found : Int
required: String
val (n: String, l: Int) = (4, ""); |
scabug
closed this
May 3, 2012
scabug
added
the
patmat
label
Apr 7, 2017
scabug
added this to the 2.10.0-M3 milestone
Apr 7, 2017
scabug
assigned
adriaanm
Apr 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
scabug commentedOct 22, 2011
I think this deserves more than an "unchecked" warning:
This is specially surprising because this other very similar case (created from #140, which I initially thought was the same bug) works as I expected: