diff options
author | Martin Odersky <odersky@gmail.com> | 2009-11-07 15:44:54 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-11-07 15:44:54 +0000 |
commit | c6dfb1e3162e6970cf0bf7f4431b8527d761c5fc (patch) | |
tree | 6efff674f37265495364d711ae49df77c8f61a50 /src | |
parent | 86a6ad44fd66e2b1e9cb1aec6a4bd9266d6fbd91 (diff) | |
download | scala-c6dfb1e3162e6970cf0bf7f4431b8527d761c5fc.tar.gz scala-c6dfb1e3162e6970cf0bf7f4431b8527d761c5fc.tar.bz2 scala-c6dfb1e3162e6970cf0bf7f4431b8527d761c5fc.zip |
Fixed #2414
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 46a4066624..c423258e00 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -765,8 +765,13 @@ trait Infer { case ExistentialType(tparams, qtpe) => isApplicable(undetparams, qtpe, argtpes0, pt) case MethodType(params, _) => - // repeat varargs as needed, remove ByName - val formals = formalTypes(params map (_.tpe), argtpes0.length) + def paramType(param: Symbol) = param.tpe match { + case TypeRef(_, sym, List(tpe)) if sym isNonBottomSubClass CodeClass => + tpe + case tpe => + tpe + } + val formals = formalTypes(params map paramType, argtpes0.length) def tryTupleApply: Boolean = { // if 1 formal, 1 argtpe (a tuple), otherwise unmodified argtpes0 |