aboutsummaryrefslogtreecommitdiff
path: root/tests/patmat/t7020.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/patmat/t7020.scala')
-rw-r--r--tests/patmat/t7020.scala30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/patmat/t7020.scala b/tests/patmat/t7020.scala
new file mode 100644
index 000000000..cc5421bab
--- /dev/null
+++ b/tests/patmat/t7020.scala
@@ -0,0 +1,30 @@
+object Test {
+ // warning was non-deterministic
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+
+ List(5) match {
+ case 1 :: Nil | 2 :: Nil =>
+ case (x@(4 | 5 | 6)) :: Nil =>
+ case 7 :: Nil =>
+ case Nil =>
+ }
+}