summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-02-03 22:06:42 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-02-04 09:19:19 +1000
commitda46355a90442636ee7634c31a69eae8e8b9cd42 (patch)
treeeec9abbf057e3c5fd4566df6628f9693835cc536 /test/files
parent74e53cb4930fc3e02222d8be0f065ce8aaa71230 (diff)
parentcc6fea6d30609b8879db1ecdbc288e4cdaa5b8d4 (diff)
downloadscala-da46355a90442636ee7634c31a69eae8e8b9cd42.tar.gz
scala-da46355a90442636ee7634c31a69eae8e8b9cd42.tar.bz2
scala-da46355a90442636ee7634c31a69eae8e8b9cd42.zip
Merge commit 'cc6fea6' into merge/2.11.x-to-2.12.x-20160203
Conflicts: build.sbt scripts/jobs/integrate/bootstrap
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/future-spec/FutureTests.scala2
-rw-r--r--test/files/neg/t9572.check7
-rw-r--r--test/files/neg/t9572.scala6
3 files changed, 14 insertions, 1 deletions
diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala
index abcf1b4cbc..d0de2f5542 100644
--- a/test/files/jvm/future-spec/FutureTests.scala
+++ b/test/files/jvm/future-spec/FutureTests.scala
@@ -238,7 +238,7 @@ class FutureTests extends MinimalScalaTest {
"support pattern matching within a for-comprehension" in {
case class Req[T](req: T)
case class Res[T](res: T)
- def async[T](req: Req[T]) = req match {
+ def async[T](req: Req[T]) = (req: @unchecked) match {
case Req(s: String) => Future { Res(s.length) }
case Req(i: Int) => Future { Res((i * 2).toString) }
}
diff --git a/test/files/neg/t9572.check b/test/files/neg/t9572.check
new file mode 100644
index 0000000000..b95bd015cf
--- /dev/null
+++ b/test/files/neg/t9572.check
@@ -0,0 +1,7 @@
+t9572.scala:3: error: too many elements for tuple: 23, allowed: 22
+ val term23 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23)
+ ^
+t9572.scala:5: error: too many elements for tuple: 23, allowed: 22
+ val type23: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null
+ ^
+two errors found
diff --git a/test/files/neg/t9572.scala b/test/files/neg/t9572.scala
new file mode 100644
index 0000000000..32b2db320e
--- /dev/null
+++ b/test/files/neg/t9572.scala
@@ -0,0 +1,6 @@
+class T9572 {
+ val term22 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22)
+ val term23 = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23)
+ val type22: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null
+ val type23: (Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = null
+}