We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da20e0c commit 38f1d50Copy full SHA for 38f1d50
tests/warn/i24246.check
@@ -0,0 +1,8 @@
1
+-- [E029] Pattern Match Exhaustivity Warning: tests/warn/i24246.scala:8:2 ----------------------------------------------
2
+8 | x match { // warn
3
+ | ^
4
+ | match may not be exhaustive.
5
+ |
6
+ | It would fail on pattern case: ZZ
7
8
+ | longer explanation available when compiling with `-explain`
tests/warn/i24246.scala
@@ -0,0 +1,10 @@
+trait X
+
+sealed trait Y
+case object YY extends Y, X
+case object ZZ extends Y, X
+def foo[A <: X & Y](x: A): Unit =
+ x match { // warn
9
+ case YY => ()
10
+ }
0 commit comments