aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-01 18:43:04 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-01 18:43:04 +1100
commitabbee9e28ef3f0150c9afa48f485ecc49e0e3787 (patch)
tree0c7b6ec5527eda212a7aaea856a5cca06690255c /tests/neg
parent029c6aa106c5a8e91d2f75421ce20ee87ff1b8f8 (diff)
downloaddotty-abbee9e28ef3f0150c9afa48f485ecc49e0e3787.tar.gz
dotty-abbee9e28ef3f0150c9afa48f485ecc49e0e3787.tar.bz2
dotty-abbee9e28ef3f0150c9afa48f485ecc49e0e3787.zip
Update test file
Updated with SI issues reported by Jason
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/undet-classtag.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/neg/undet-classtag.scala b/tests/neg/undet-classtag.scala
index 563596d14..dfe0eb2db 100644
--- a/tests/neg/undet-classtag.scala
+++ b/tests/neg/undet-classtag.scala
@@ -1,5 +1,27 @@
+import scala.reflect.ClassTag
+
object Test {
def f[T: reflect.ClassTag](x: T) = ???
f(???) // error: undetermined ClassTag
}
+
+// SI 9754
+object Program {
+ def test[T: ClassTag](x: T) = {
+ val arr = new Array[T](1)
+ println(arr.getClass)
+ println(x.getClass)
+ arr(0) = x
+ }
+
+ def main(args: Array[String]): Unit = {
+ test(new Array[Nothing](0)) // error: undetermined ClassTag
+ }
+}
+
+// SI 5353
+object t5353 {
+ if (false) Array("qwe") else Array() // error: undetermined ClassTag
+}
+