Skip to content

Commit fdbdb70

Browse files
test: add in a regression test for #8742 (#17483)
There was also some other tests that were _very_ similar to this, so it seemed like the logical place to also just include this one instead of creating another file for it. Closes #8742
2 parents 22fcff1 + d23db88 commit fdbdb70

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/neg-custom-args/fatal-warnings/i8711.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
12 | case x: C => x // error
77
| ^^^^
88
| Unreachable case
9+
-- [E030] Match case Unreachable Error: tests/neg-custom-args/fatal-warnings/i8711.scala:17:9 --------------------------
10+
17 | case x: (B | C) => x // error
11+
| ^^^^^^^^^^
12+
| Unreachable case

tests/neg-custom-args/fatal-warnings/i8711.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ object Test {
1212
case x: C => x // error
1313
case _ =>
1414
}
15+
16+
def baz(x: A) = x match {
17+
case x: (B | C) => x // error
18+
case _ =>
19+
}
1520
}

0 commit comments

Comments
 (0)