diff options
author | Martin Odersky <odersky@gmail.com> | 2010-06-20 22:59:48 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-06-20 22:59:48 +0000 |
commit | 4090a03561a202705968a5be2af81fe6563ecbb6 (patch) | |
tree | 316536a62b183124d2a7e6deb0e6fd5ee8d47a98 | |
parent | a54a2d8ba883e66107e5cc8959a8b28174ceaff5 (diff) | |
download | scala-4090a03561a202705968a5be2af81fe6563ecbb6.tar.gz scala-4090a03561a202705968a5be2af81fe6563ecbb6.tar.bz2 scala-4090a03561a202705968a5be2af81fe6563ecbb6.zip |
Merged patch that uses weak_<:< for result type...
Merged patch that uses weak_<:< for result type comparisons in method
resolutions
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 31bb86994e..a2594a060b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -344,7 +344,7 @@ trait Infer { def isCompatible(tp: Type, pt: Type): Boolean = { val tp1 = normalize(tp) - (tp1 <:< pt) || isCoercible(tp1, pt) + (tp1 weak_<:< pt) || isCoercible(tp1, pt) } final def normSubType(tp: Type, pt: Type): Boolean = tp match { @@ -1595,6 +1595,8 @@ trait Infer { var allApplicable = alts filter (alt => isApplicable(undetparams, followApply(pre.memberType(alt)), argtpes, pt)) + //log("applicable: "+ (allApplicable map pre.memberType)) + if (varArgsOnly) allApplicable = allApplicable filter (alt => isVarArgs(alt.tpe.params)) |