diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 21:51:24 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 22:00:41 +0100 |
commit | 1e0a30a744e6853b1e69928a63b327226f4bf27f (patch) | |
tree | b429dc5ae5983c3e06abc7f346135b152e144458 /src/compiler | |
parent | 8b598436f64ca4e980c8a38f642085b4d23e2327 (diff) | |
download | scala-1e0a30a744e6853b1e69928a63b327226f4bf27f.tar.gz scala-1e0a30a744e6853b1e69928a63b327226f4bf27f.tar.bz2 scala-1e0a30a744e6853b1e69928a63b327226f4bf27f.zip |
SI-6644 Account for varargs in extmethod forwarder
Which sounded difficult, so instead I offshored the work
to the friendly republic of TreeGen.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala index 6cc957a9eb..6f3d7932a5 100644 --- a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala +++ b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala @@ -173,9 +173,7 @@ abstract class ExtensionMethods extends Transform with TypingTransformers { List(This(currentOwner))) val extensionCall = atOwner(origMeth) { localTyper.typedPos(rhs.pos) { - (extensionCallPrefix /: vparamss) { - case (fn, params) => Apply(fn, params map (param => Ident(param.symbol))) - } + gen.mkForwarder(extensionCallPrefix, mmap(vparamss)(_.symbol)) } } deriveDefDef(tree)(_ => extensionCall) |