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
The warning in the following is unnecessary:
Welcome to Scala version 2.10.0-20120629-080700-cd1e6f94e9 [...] def x(in: (Int, Boolean)) = in match { case (i: Int, b: Boolean) => 3 } <console>:7: warning: match may not be exhaustive. It would fail on the following inputs: (_, false), (_, true) def x(in: (Int, Boolean)) = in match { case (i: Int, b: Boolean) => 3 } ^
There is no warning if the Int is ignored or bound without an explicit type:
scala> def x(in: (Int, Boolean)) = in match { case (_, b: Boolean) => 3 } x: (in: (Int, Boolean))Int
Keeping the explicit type for the Int but dropping the one for Boolean presents a spurious warning again:
scala> def x(in: (Int, Boolean)) = in match { case (i: Int, b) => 3 } <console>:7: warning: match may not be exhaustive. It would fail on the following input: (_, _) def x(in: (Int, Boolean)) = in match { case (i: Int, b) => 3 } ^ scala> x((3,true)) res2: Int = 3
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-6008?orig=1 Reporter: @harrah
Sorry, something went wrong.
@adriaanm said: scala/scala#824
@harrah said: Thank you.
@adriaanm said: thank you for reporting :-)
adriaanm
No branches or pull requests
The warning in the following is unnecessary:
There is no warning if the Int is ignored or bound without an explicit type:
Keeping the explicit type for the Int but dropping the one for Boolean presents a spurious warning again:
The text was updated successfully, but these errors were encountered: