Closed
Description
Minimized example
object test:
val x: Int | String = 1
x match
case _: Int =>
case _: String =>
Output
-- Error: i8779.scala:6:9 ------------------------------------------------------
6 | case _: Int =>
| ^
|this case is unreachable since type Int | String is not a subclass of class Integer
Expectation
Should compile.
Metadata
Metadata
Assignees
Labels
No labels