diff options
author | Martin Odersky <odersky@gmail.com> | 2010-01-11 15:48:58 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-01-11 15:48:58 +0000 |
commit | 466920e8952fc7395d278022bb236493cf9a363c (patch) | |
tree | 889379e847e2ff331219cfaf71c1e657e1571a0f /src | |
parent | d163f6971b8b104b1f6f6a7737d7986f63038354 (diff) | |
download | scala-466920e8952fc7395d278022bb236493cf9a363c.tar.gz scala-466920e8952fc7395d278022bb236493cf9a363c.tar.bz2 scala-466920e8952fc7395d278022bb236493cf9a363c.zip |
Removed extraneous clause is isStrictlyMoreSpec...
Removed extraneous clause is isStrictlyMoreSpecific
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 5c6788f0f6..1397aa06eb 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -990,12 +990,12 @@ trait Infer { val specificCount = (if (isAsSpecific(ftpe1, ftpe2)) 1 else 0) - (if (isAsSpecific(ftpe2, ftpe1) && // todo: move to isAsSepecific test - (!ftpe2.isInstanceOf[OverloadedType] || ftpe1.isInstanceOf[OverloadedType]) && +// (!ftpe2.isInstanceOf[OverloadedType] || ftpe1.isInstanceOf[OverloadedType]) && (!phase.erasedTypes || covariantReturnOverride(ftpe1, ftpe2))) 1 else 0) val subClassCount = (if (isInProperSubClassOrObject(sym1, sym2)) 1 else 0) - (if (isInProperSubClassOrObject(sym2, sym1)) 1 else 0) - //println("is more specific? "+sym1+sym1.locationString+"/"+sym2+sym2.locationString+":"+ - // specificCount+"/"+subClassCount) +// println("is more specific? "+sym1+":"+ftpe1+sym1.locationString+"/"+sym2+":"+ftpe2+sym2.locationString+":"+ +// specificCount+"/"+subClassCount) specificCount + subClassCount > 0 } } @@ -1714,6 +1714,7 @@ trait Infer { }) def improves(sym1: Symbol, sym2: Symbol) = +// util.trace("improve "+sym1+sym1.locationString+" on "+sym2+sym2.locationString)( sym2 == NoSymbol || sym2.isError || isStrictlyMoreSpecific(followApply(pre.memberType(sym1)), followApply(pre.memberType(sym2)), sym1, sym2) |