summaryrefslogtreecommitdiff
path: root/test/files/run/t6223.scala
diff options
context:
space:
mode:
authorErik Osheim <d_m@plastic-idolatry.com>2012-08-13 12:04:14 -0400
committerErik Osheim <d_m@plastic-idolatry.com>2012-08-13 15:31:57 -0400
commit97ae6f6f72dba8d6d911ad3c8dae4da679aeb586 (patch)
tree8aad8f8662c36d993dc6b8bc0cac9920cb26fab3 /test/files/run/t6223.scala
parent8cfba0fb219a49cceeb0318a6562aa3a602d913c (diff)
downloadscala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.tar.gz
scala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.tar.bz2
scala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.zip
Move side-effecting call out of debuglog(). Fixes SI-6223.
This change fixes a situation in which method calls aren't being properly specialized. All the existing tests pass; in addition, it likely fixes other specialization bugs (and improves performance of specialized code). Also includes a small regression test.
Diffstat (limited to 'test/files/run/t6223.scala')
-rw-r--r--test/files/run/t6223.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t6223.scala b/test/files/run/t6223.scala
new file mode 100644
index 0000000000..4ab7c832e6
--- /dev/null
+++ b/test/files/run/t6223.scala
@@ -0,0 +1,11 @@
+class Foo[@specialized(Int) A](a:A) {
+ def bar[@specialized(Int) B](f:A => B) = new Foo(f(a))
+}
+
+object Test {
+ def main(args:Array[String]) {
+ val f = new Foo(333)
+ val ms = f.getClass().getDeclaredMethods()
+ ms.foreach(m => println(m.getName))
+ }
+}