summaryrefslogtreecommitdiff
path: root/test/files/pos/t7294.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-03-24 13:56:19 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-03-24 21:41:37 +0100
commit8d537a13999878673b8d18c2429dbd6b97728e72 (patch)
tree565dc33ca2522659d7817dcc3d421b9eff115218 /test/files/pos/t7294.scala
parent1187c9896c097e6e591e5655b35f52c06b3c900a (diff)
downloadscala-8d537a13999878673b8d18c2429dbd6b97728e72.tar.gz
scala-8d537a13999878673b8d18c2429dbd6b97728e72.tar.bz2
scala-8d537a13999878673b8d18c2429dbd6b97728e72.zip
SI-7294 Treat TupleN as final under -Xfuture
For the purposes of checkability warnings. This will warn in case of: scala> (1, 2) match { case Seq() => 0; case _ => 1 } res9: Int = 1 Given how often Tuples are used as scrutinees, this is a highly desirable place to warn. I was orginally going to unlock this under -Xlint, and could be easily convinced to go that way, given that -Xfuture is a less popular option.
Diffstat (limited to 'test/files/pos/t7294.scala')
-rw-r--r--test/files/pos/t7294.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t7294.scala b/test/files/pos/t7294.scala
new file mode 100644
index 0000000000..ccac2b1400
--- /dev/null
+++ b/test/files/pos/t7294.scala
@@ -0,0 +1,6 @@
+object Test {
+ // no fruitless warning as Tuple2 isn't (yet) final.
+ // The corresponding `neg` test will treat it as final
+ // for the purposes of these tests under -Xfuture.
+ (1, 2) match { case Seq() => 0; case _ => 1 }
+}