diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-24 05:43:58 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-27 13:04:45 -0700 |
commit | e26f5c412a2498c23c8cc3e975208a71f8f7d558 (patch) | |
tree | 41d35674cd70aa47ec0a9faf707d2994f6c1b580 /test/files | |
parent | e42991f40707023d563f43bf66f3d8b9a637aa1b (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t7088.check | 2 | ||||
-rw-r--r-- | test/files/run/t7088.scala | 13 |
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) + } +} |