We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 01c5eac + f548147 commit 61cba97Copy full SHA for 61cba97
tests/patmat/t4661b.check
@@ -0,0 +1,2 @@
1
+10: Pattern Match Exhaustivity: _: c.Foo
2
+13: Match case Unreachable
tests/patmat/t4661b.scala
@@ -0,0 +1,15 @@
+class C {
+ trait Foo
3
+ class One extends Foo
4
+ class Two extends Foo
5
+ class Bla extends One
6
+}
7
+
8
+class Test(val c: C) {
9
+ import c._
10
+ def test(f: Foo) = f match { // not exhaustive
11
+ case f: One =>
12
+ case f: Two =>
13
+ case f: Bla => // unreachable case
14
+ }
15
0 commit comments