scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

2.10.0-M4: pattern matching + -Ywarn-dead-code = many spurious warnings #5930

Closed scabug closed 12 years ago

scabug commented 12 years ago

-Ywarn-dead-code has an itchy trigger finger in M4. almost any pattern match sets it off:

Welcome to Scala version 2.10.0-M4

scala> 0 match { case x: Int => }
<console>:8: warning: dead code following this construct
              0 match { case x: Int => }
              ^

(I get dozens of these warnings when I compile my Project Euler solutions.)

scabug commented 12 years ago

Imported From: https://issues.scala-lang.org/browse/SI-5930?orig=1 Reporter: @SethTisue

scabug commented 12 years ago

@adriaanm said: https://github.com/scala/scala/pull/982