summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-03-13 16:55:04 +0000
committerMartin Odersky <odersky@gmail.com>2007-03-13 16:55:04 +0000
commit2bca03b1f530b69874e45aa07e51f6aeacc28a40 (patch)
tree2901fdf06c59874eab388bc2475ace18e72fd214 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentf947c1f55fcb33a6cb2ba52f587b07ac982f33dc (diff)
downloadscala-2bca03b1f530b69874e45aa07e51f6aeacc28a40.tar.gz
scala-2bca03b1f530b69874e45aa07e51f6aeacc28a40.tar.bz2
scala-2bca03b1f530b69874e45aa07e51f6aeacc28a40.zip
reverted bug1000 fix, because it caused wquickd...
reverted bug1000 fix, because it caused wquickdoc to crash
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index f8b8b423d2..293d11053d 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1411,10 +1411,15 @@ trait Typers requires Analyzer {
// preadapt symbol to number of arguments given
val argtypes = args map (arg => AllClass.tpe)
val pre = fun.symbol.tpe.prefix
- val sym = fun.symbol filter { alt =>
- isApplicable(context.undetparams, pre.memberType(alt), argtypes, pt) &&
+ var sym = fun.symbol filter { alt =>
+ isApplicable(context.undetparams, pre.memberType(alt), argtypes, pt)
+ }
+ if (sym hasFlag OVERLOADED) {
// eliminate functions that would result from tupling transforms
- formalTypes(alt.tpe.paramTypes, argtypes.length).length == argtypes.length
+ val sym1 = sym filter { alt =>
+ formalTypes(alt.tpe.paramTypes, argtypes.length).length == argtypes.length
+ }
+ if (sym1 != NoSymbol) sym = sym1
}
if (sym != NoSymbol)
fun = adapt(fun setSymbol sym setType pre.memberType(sym), funMode(mode), WildcardType)