You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across an unreachable code warning which should not be present, in Scala 2.10.0-RC3:
objectTest {
typeId[X] =Xdefmain(args: Array[String]) {
vala:Id[Option[Int]] =None
a match {
caseSome(x) => println(x)
caseNone=> println("Nothing")
}
}
}
$ sbt run
[info] Set current project to default-2e4ad8 (in build file:../)
[info] Compiling1Scala source to .../target/scala-2.10/classes...
[warn] .../src/main/scala/Test.scala:9: unreachable code
[warn] caseNone=> println("Nothing")
[warn] ^
[warn] one warning found
[info] RunningTestNothing
If, instead, the code looks like
typeId[X] =Option[X]
and
vala:Id[Int] =None
no unreachable code warning appears.
The text was updated successfully, but these errors were encountered:
I came across an unreachable code warning which should not be present, in Scala 2.10.0-RC3:
If, instead, the code looks like
and
no unreachable code warning appears.
The text was updated successfully, but these errors were encountered: