diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | 7 | ||||
-rw-r--r-- | test/files/run/t6223.check | 4 | ||||
-rw-r--r-- | test/files/run/t6223.scala | 11 |
3 files changed, 18 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 005d26e119..db97308f41 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -652,11 +652,10 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { info(specMember) = Implementation(original) typeEnv(specMember) = env ++ typeEnv(m) - } - else debuglog({ + } else { val om = forwardToOverload(m) - "normalizedMember " + m + " om: " + om + " " + pp(typeEnv(om)) - }) + debuglog("normalizedMember " + m + " om: " + om + " " + pp(typeEnv(om))) + } } else debuglog("conflicting env for " + m + " env: " + env) 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)) + } +} |