We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.1.3
3.2.1-RC1-bin-20220623-5a8a61d-NIGHTLY
//> using scala "3.2.1-RC1-bin-20220623-5a8a61d-NIGHTLY" sealed trait Coverage { import Coverage.{ Empty, Range } def ⋂(other: Coverage): Coverage = (this, other) match { case (Empty, _) => Empty case (_, Empty) => println("unreachable") Empty case (Range(a, b), Range(aʹ, bʹ)) => Coverage(a max aʹ, b min bʹ) } } object Coverage { def apply(min: Double, max: Double): Coverage = if (min < max) new Range(min, max) {} else Empty case object Empty extends Coverage sealed abstract case class Range(min: Double, max: Double) extends Coverage } @main def main = Coverage(0, 1).⋂(Coverage.Empty)
$ scala-cli bug.scala Compiling project (Scala 3.2.1-RC1-bin-20220623-5a8a61d-NIGHTLY, JVM) [warn] ./bug.scala:10:12: Unreachable case [warn] case (_, Empty) => [warn] ^^^^^^^^^^ Compiled project (Scala 3.2.1-RC1-bin-20220623-5a8a61d-NIGHTLY, JVM) unreachable
This is a regression since 3.1.2.
The text was updated successfully, but these errors were encountered:
dwijnand
Successfully merging a pull request may close this issue.
Compiler version
3.1.3
3.2.1-RC1-bin-20220623-5a8a61d-NIGHTLY
Minimized code
Output
Expectation
This is a regression since 3.1.2.
The text was updated successfully, but these errors were encountered: