File tree 2 files changed +23
-0
lines changed
tests/neg-custom-args/fatal-warnings 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- Error: tests/neg-custom-args/fatal-warnings/i8711.scala:7:9 ---------------------------------------------------------
2
+ 7 | case x: B => x // error: this case is unreachable since class A is not a subclass of class B
3
+ | ^
4
+ | this case is unreachable since type A and class B are unrelated
5
+ -- Error: tests/neg-custom-args/fatal-warnings/i8711.scala:12:9 --------------------------------------------------------
6
+ 12 | case x: C => x // error
7
+ | ^
8
+ | this case is unreachable since type A | B and class C are unrelated
Original file line number Diff line number Diff line change
1
+ class A
2
+ class B
3
+ class C
4
+
5
+ object Test {
6
+ def foo (x : A ) = x match {
7
+ case x : B => x // error: this case is unreachable since class A is not a subclass of class B
8
+ case _ =>
9
+ }
10
+
11
+ def bar (x : A | B ) = x match {
12
+ case x : C => x // error
13
+ case _ =>
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments