summaryrefslogtreecommitdiff
path: root/test/files/run/t7088.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-24 05:43:58 -0700
committerPaul Phillips <paulp@improving.org>2013-05-27 13:04:45 -0700
commite26f5c412a2498c23c8cc3e975208a71f8f7d558 (patch)
tree41d35674cd70aa47ec0a9faf707d2994f6c1b580 /test/files/run/t7088.scala
parente42991f40707023d563f43bf66f3d8b9a637aa1b (diff)
downloadscala-e26f5c412a2498c23c8cc3e975208a71f8f7d558.tar.gz
scala-e26f5c412a2498c23c8cc3e975208a71f8f7d558.tar.bz2
scala-e26f5c412a2498c23c8cc3e975208a71f8f7d558.zip
SI-7088 Array crasher in erasure.
The usual business where half our pattern matches are missing half the necessary cases.
Diffstat (limited to 'test/files/run/t7088.scala')
-rw-r--r--test/files/run/t7088.scala13
1 files changed, 13 insertions, 0 deletions
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)
+ }
+}