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
{{ message }}
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.
packagecom.example;
publicenumMyEnum {
FOO,
BAR,
BAZ,
}
And I match on it from Scala like this:
packagecom.exampleobjectFoo {
deffoo(e: MyEnum):Int= e match {
caseMyEnum.FOO=>1caseMyEnum.BAR=>2caseMyEnum.BAZ=>3
}
}
I get a warning:
[warn] .../Foo.scala:5: match may not be exhaustive.
[warn] It would fail on the following input: (x: com.example.MyEnum forSome x not in (BAR, BAZ, FOO))
[warn] def foo(e: MyEnum): Int = e match {
[warn] ^
If I have a Java enum like this:
And I match on it from Scala like this:
I get a warning:
Build options:
Note, that I cannot reproduce the issue with version
2.12.2-bin-typelevel-4
.The text was updated successfully, but these errors were encountered: