From 97ae6f6f72dba8d6d911ad3c8dae4da679aeb586 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Mon, 13 Aug 2012 12:04:14 -0400 Subject: 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. --- test/files/run/t6223.check | 4 ++++ test/files/run/t6223.scala | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/files/run/t6223.check create mode 100644 test/files/run/t6223.scala (limited to 'test/files/run') diff --git a/test/files/run/t6223.check b/test/files/run/t6223.check new file mode 100644 index 0000000000..90ec019407 --- /dev/null +++ b/test/files/run/t6223.check @@ -0,0 +1,4 @@ +bar +bar$mcI$sp +bar$mIc$sp +bar$mIcI$sp 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)) + } +} -- cgit v1.2.3