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 was 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] ^