diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-05 21:22:06 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-05 21:22:06 +0000 |
commit | f52458dfff38f9b50031f796d09ce02d370b9bd3 (patch) | |
tree | 9f5edd965f1ef09cd36e82982d6920b98a32d9f7 /test/files/run | |
parent | 7804031bb3591a51d68a3a2bdeea69f2bacc3e5f (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/bug1005.check | 2 | ||||
-rw-r--r-- | test/files/run/bug1005.scala | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/bug1005.check b/test/files/run/bug1005.check new file mode 100644 index 0000000000..6ec0929090 --- /dev/null +++ b/test/files/run/bug1005.check @@ -0,0 +1,2 @@ +Halp! +Halp! 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) + } +} + |