diff options
author | Martin Odersky <odersky@gmail.com> | 2007-08-21 14:04:16 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-08-21 14:04:16 +0000 |
commit | 93e7d7fe4d11f4cf474b31e9950ab4eb6457743d (patch) | |
tree | 051a0a985e35e22298ac315fce1d43cba94618d2 /src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala | |
parent | ecbe1cdd177b903796a65e29c6a2104197c54654 (diff) | |
download | scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.tar.gz scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.tar.bz2 scala-93e7d7fe4d11f4cf474b31e9950ab4eb6457743d.zip |
some fix for bug1279
applied Koltsov patch
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala b/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala index 02ccd6322e..1cdcf6210a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala +++ b/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala @@ -80,7 +80,11 @@ trait EtaExpansion { self: Analyzer => ValDef(Modifiers(SYNTHETIC | PARAM), freshName(), TypeTree() .setType(formal), EmptyTree)) val args = params map (param => Ident(param.name)) - atPos(tree.pos)(Function(params, expand(Apply(tree, args), restpe))) + val applyArgs = + if (isVarArgs(formals)) args.init ::: Typed(args.last, Ident(nme.WILDCARD_STAR.toTypeName)) :: Nil + else args + atPos(tree.pos)(Function(params, expand(Apply(tree, applyArgs), restpe))) + //atPos(tree.pos)(Function(params, expand(Apply(tree, args), restpe))) case _ => tree } |