summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-17 09:52:40 -0800
committerPaul Phillips <paulp@improving.org>2012-02-17 11:10:23 -0800
commit1e648c386216d4c60121321a7ec40e2536bada9c (patch)
tree300e7095cf45ba476dd5717f028cd154f4e7f702 /test/pending
parent91148376049a152edec12348ff9b7e9e93e6ebe1 (diff)
downloadscala-1e648c386216d4c60121321a7ec40e2536bada9c.tar.gz
scala-1e648c386216d4c60121321a7ec40e2536bada9c.tar.bz2
scala-1e648c386216d4c60121321a7ec40e2536bada9c.zip
Fixed AnyRef specialization.
At least for the value of fix which means "better than it was in 2.9." I accidentally spent a long while trying to fix something I didn't realize I hadn't broken. But then I lucked into partially fixing it, so that's good news. See run/t5488-fn.scala if you want to see what still doesn't work. (It's covered at SI-4770, which is now reopened.) Closes SI-5488.
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/t4770.check2
-rw-r--r--test/pending/run/t4770.scala15
2 files changed, 17 insertions, 0 deletions
diff --git a/test/pending/run/t4770.check b/test/pending/run/t4770.check
new file mode 100644
index 0000000000..38e5a831fa
--- /dev/null
+++ b/test/pending/run/t4770.check
@@ -0,0 +1,2 @@
+(a,2)
+(2,a)
diff --git a/test/pending/run/t4770.scala b/test/pending/run/t4770.scala
new file mode 100644
index 0000000000..25bf3050c3
--- /dev/null
+++ b/test/pending/run/t4770.scala
@@ -0,0 +1,15 @@
+package crasher {
+ class Z[@specialized A, @specialized(AnyRef) B](var a: A, var b: B) {
+ override def toString = "" + ((a, b))
+ }
+ object O {
+ def apply[@specialized A, @specialized(AnyRef) B](a0: A, b0: B) = new Z(a0, b0)
+ }
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ println(crasher.O("a", 2))
+ println(crasher.O(2, "a"))
+ }
+}