summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t7088.check2
-rw-r--r--test/files/run/t7088.scala13
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t7088.check b/test/files/run/t7088.check
new file mode 100644
index 0000000000..1191247b6d
--- /dev/null
+++ b/test/files/run/t7088.check
@@ -0,0 +1,2 @@
+1
+2
diff --git a/test/files/run/t7088.scala b/test/files/run/t7088.scala
new file mode 100644
index 0000000000..5f0114b940
--- /dev/null
+++ b/test/files/run/t7088.scala
@@ -0,0 +1,13 @@
+object Test {
+ type Tag[X] = {type Tag = X}
+ type TaggedArray[T] = Array[T] with Tag[Any]
+
+ def method[T: scala.reflect.ClassTag](a: TaggedArray[T], value: T) {
+ a.update(0, value)
+ a foreach println
+ }
+
+ def main(args: Array[String]): Unit = {
+ method(Array(1, 2).asInstanceOf[TaggedArray[Int]], 1)
+ }
+}