diff options
Diffstat (limited to 'tests/untried/neg/t6048.scala')
-rw-r--r-- | tests/untried/neg/t6048.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/untried/neg/t6048.scala b/tests/untried/neg/t6048.scala new file mode 100644 index 000000000..803e651d1 --- /dev/null +++ b/tests/untried/neg/t6048.scala @@ -0,0 +1,22 @@ +class A { + def f1(x: Int) = x match { + case _ if false => x // unreachable + case 5 => x + } + + def f2(x: Int) = x match { + case _ if false => x // unreachable + case 5 if true => x + } + + def f3(x: Int) = x match { + case _ => x + case 5 if true => x // unreachable + } + + def test1(x: Int) = x match { + case c if c < 0 => 0 + case 1 => 1 + case _ => 2 + } +} |