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.3.1, 3.4.0-RC1-bin-20231223-938d405-NIGHTLY
3.3.1
3.4.0-RC1-bin-20231223-938d405-NIGHTLY
//> using scala 3.3.1 sealed trait Plan[+E <: Plan.Error, +F[+e <: E] <: Plan.Fallible[e]] object Plan { case class Upcast() extends Plan[Nothing, Nothing] case class BetweenProducts[+E <: Plan.Error, +F[+e <: E] <: Plan.Fallible[e]](fields: List[Plan[E, F]]) extends Plan[E, F] case class Error() extends Plan[Plan.Error, Nothing] case class Fallible[+E <: Plan.Error]() extends Plan[E, Plan.Fallible] } @main def main = { val erroneousNotFallible: Plan[Plan.Error, Nothing] = Plan.BetweenProducts(Nil) erroneousNotFallible match case Plan.Upcast() => println("not boom") case Plan.BetweenProducts(fields) => println("reachable after all") case Plan.Error() => println("not boom") }
Compiling project (Scala 3.3.1, JVM (11)) [warn] ./Repro.scala:17:10 [warn] Unreachable case [warn] case Plan.BetweenProducts(fields) => println("reachable after all") [warn] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Compiled project (Scala 3.3.1, JVM (11)) reachable after all
No unreachable case warning.
The text was updated successfully, but these errors were encountered:
Allow constraining a parameter to Nothing (#19397)
8039426
Fixes #19359
dwijnand
Successfully merging a pull request may close this issue.
Compiler version
3.3.1
,3.4.0-RC1-bin-20231223-938d405-NIGHTLY
Minimized code
Output
Expectation
No unreachable case warning.
The text was updated successfully, but these errors were encountered: