File tree 1 file changed +3
-8
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -972,20 +972,15 @@ object Denotations {
972
972
final def matches (other : SingleDenotation )(implicit ctx : Context ): Boolean =
973
973
val d = signature.matchDegree(other.signature)
974
974
975
- /** Slower check used if the signatures alone do not tell us enough to be sure about matching */
976
- def slowCheck = info.matches(other.info)
977
-
978
975
d match
979
976
case FullMatch =>
980
- if infoOrCompleter.isInstanceOf [PolyType ] || other.infoOrCompleter.isInstanceOf [PolyType ] then
981
- slowCheck
982
- else
983
- true
977
+ true
984
978
case MethodNotAMethodMatch =>
985
979
// Java allows defining both a field and a zero-parameter method with the same name
986
980
! ctx.erasedTypes && ! (symbol.is(JavaDefined ) && other.symbol.is(JavaDefined ))
987
981
case ParamMatch =>
988
- ! ctx.erasedTypes && slowCheck
982
+ // The signatures do not tell us enough to be sure about matching
983
+ ! ctx.erasedTypes && info.matches(other.info)
989
984
case noMatch =>
990
985
false
991
986
end matches
You can’t perform that action at this time.
0 commit comments