diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t9572.check | 7 | ||||
-rw-r--r-- | test/files/neg/t9572.scala | 6 | ||||
-rw-r--r-- | test/junit/scala/reflect/ClassTag.scala | 12 |
3 files changed, 24 insertions, 1 deletions
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 +} diff --git a/test/junit/scala/reflect/ClassTag.scala b/test/junit/scala/reflect/ClassTag.scala index 90cc981fc1..49022dccda 100644 --- a/test/junit/scala/reflect/ClassTag.scala +++ b/test/junit/scala/reflect/ClassTag.scala @@ -26,4 +26,14 @@ class ClassTagTest { @Test def checkDouble = assertTrue(checkNotInt[Double] (0.toDouble)) @Test def checkBoolean = assertTrue(checkNotInt[Boolean](false)) @Test def checkUnit = assertTrue(checkNotInt[Unit] ({})) -}
\ No newline at end of file + + @Test def t9534: Unit = { + val ct = implicitly[scala.reflect.ClassTag[Unit]] + val a1 = ct.newArray(1) + a1(0) = () + val a2 = ct.wrap.newArray(1) + a2(0) = a1 + val a3 = ct.newArray2(1) + a3(0) = a1 + } +} |