Closed
Description
Reproduction steps
git clone git@github.com:vasilmkd/scala-java-enum-regression.git
cd scala-java-enum-regression
sbt compile
https://github.com/vasilmkd/scala-java-enum-regression
Scala version: 2.13.11
Problem (-Werror
flag is on)
[error] <path>/scala-java-enum-regression/src/main/scala/main.scala:5:23: match may not be exhaustive.
[error] It would fail on the following inputs: (_ : com.intellij.openapi.compiler.CompilerMessageCategory$1), (_ : com.intellij.openapi.compiler.CompilerMessageCategory$2), (_ : com.intellij.openapi.compiler.CompilerMessageCategory$3), (_ : com.intellij.openapi.compiler.CompilerMessageCategory$4)
[error] val messageType = category match {
[error] ^
[error] one error found
Further context
- Scala 2.13.10 does not exhibit this behavior.
- Compiling using Scala 3.3.0 and Scala 2.12.18 works fine.
- The warning/error is not issued if the same Java source code is copied into a
.java
file and compiled usingsbt
. It is necessary for this enum to be published in a library. (Might be a problem with classfile decompilation?)