diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 3 | ||||
-rw-r--r-- | test/files/run/t4024.scala | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index a9f6d39cc1..aa3086c05b 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -419,7 +419,8 @@ abstract class UnCurry extends InfoTransform with TypingTransformers with ast.Tr } atPhase(phase.next) { localTyper.typedPos(pos) { - Apply(gen.mkAttributedSelect(tree, toArraySym), List(getManifest(tree.tpe.typeArgs.head))) + Apply(gen.mkAttributedSelect(tree, toArraySym), + List(getManifest(tree.tpe.baseType(TraversableClass).typeArgs.head))) } } } diff --git a/test/files/run/t4024.scala b/test/files/run/t4024.scala new file mode 100644 index 0000000000..b822a7781c --- /dev/null +++ b/test/files/run/t4024.scala @@ -0,0 +1,9 @@ +object Test extends Application { + + val x = "abc" + + val m = x.getClass.getMethod("toString") + + assert(m.invoke(x, (Nil: List[AnyRef]): _*) == "abc") +} + |