summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/t7294.check6
-rw-r--r--test/files/neg/t7294.flags1
-rw-r--r--test/files/neg/t7294.scala5
3 files changed, 12 insertions, 0 deletions
diff --git a/test/files/neg/t7294.check b/test/files/neg/t7294.check
new file mode 100644
index 0000000000..f15289c1c0
--- /dev/null
+++ b/test/files/neg/t7294.check
@@ -0,0 +1,6 @@
+t7294.scala:4: warning: fruitless type test: a value of type (Int, Int) cannot also be a Seq[A]
+ (1, 2) match { case Seq() => 0; case _ => 1 }
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
+one error found
diff --git a/test/files/neg/t7294.flags b/test/files/neg/t7294.flags
new file mode 100644
index 0000000000..3f3381a45b
--- /dev/null
+++ b/test/files/neg/t7294.flags
@@ -0,0 +1 @@
+-Xfuture -Xfatal-warnings
diff --git a/test/files/neg/t7294.scala b/test/files/neg/t7294.scala
new file mode 100644
index 0000000000..335d071124
--- /dev/null
+++ b/test/files/neg/t7294.scala
@@ -0,0 +1,5 @@
+object Test {
+ // Treat TupleN as final under -Xfuture for the for the purposes
+ // of the "fruitless type test" warning.
+ (1, 2) match { case Seq() => 0; case _ => 1 }
+}