summaryrefslogtreecommitdiff
path: root/test/files/run/bug1005.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-10-05 21:22:06 +0000
committerPaul Phillips <paulp@improving.org>2009-10-05 21:22:06 +0000
commitf52458dfff38f9b50031f796d09ce02d370b9bd3 (patch)
tree9f5edd965f1ef09cd36e82982d6920b98a32d9f7 /test/files/run/bug1005.scala
parent7804031bb3591a51d68a3a2bdeea69f2bacc3e5f (diff)
downloadscala-f52458dfff38f9b50031f796d09ce02d370b9bd3.tar.gz
scala-f52458dfff38f9b50031f796d09ce02d370b9bd3.tar.bz2
scala-f52458dfff38f9b50031f796d09ce02d370b9bd3.zip
Test cases for some tickets fixed by recent arr...
Test cases for some tickets fixed by recent array and implicit activity: #1038, #1005, #1272.
Diffstat (limited to 'test/files/run/bug1005.scala')
-rw-r--r--test/files/run/bug1005.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/bug1005.scala b/test/files/run/bug1005.scala
new file mode 100644
index 0000000000..5ccd89dd85
--- /dev/null
+++ b/test/files/run/bug1005.scala
@@ -0,0 +1,19 @@
+object Test
+{
+ class Foo[T](x : Array[AnyRef]) { def bar = x.asInstanceOf[Array[T]] }
+ class Bar[T](x : Array[T]) { def bar = x.asInstanceOf[Array[AnyRef]] }
+
+ object FromMono{
+ def main(args : Array[String]) = (new Foo[AnyRef](Array[AnyRef]("Halp!"))).bar
+ }
+
+ object FromPoly{
+ def main(args : Array[String]) = (new Bar[AnyRef](Array[AnyRef]("Halp!"))).bar
+ }
+
+ def main(args: Array[String]): Unit = {
+ println(FromMono main null mkString)
+ println(FromPoly main null mkString)
+ }
+}
+