Skip to content

Commit c238f82

Browse files
committed
Address review comments
1 parent a784915 commit c238f82

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ object Denotations {
10211021
* erasure (see i8615b, i9109b), Erasure takes care of adding any necessary
10221022
* bridge to make this work at runtime.
10231023
*/
1024-
def matchesLoosely(other: SingleDenotation, alwaysCompareParams: Boolean = false)(using Context): Boolean =
1024+
def matchesLoosely(other: SingleDenotation, alwaysCompareTypes: Boolean = false)(using Context): Boolean =
10251025
if isType then true
10261026
else
10271027
val thisLanguage = SourceLanguage(symbol)
@@ -1031,7 +1031,7 @@ object Denotations {
10311031
val otherSig = other.signature(commonLanguage)
10321032
sig.matchDegree(otherSig) match
10331033
case FullMatch =>
1034-
!alwaysCompareParams || info.matches(other.info)
1034+
!alwaysCompareTypes || info.matches(other.info)
10351035
case MethodNotAMethodMatch =>
10361036
!ctx.erasedTypes && {
10371037
// A Scala zero-parameter method and a Scala non-method always match.

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ object RefChecks {
324324
(if (member.owner == clazz) member else clazz).srcPos))
325325

326326
/** Do types of term members `member` and `other` as seen from `self` match?
327-
* If not we treat them as not a real override and don't issue certain
327+
* If not we treat them as not a real override and don't issue override
328328
* error messages. Also, bridges are not generated in this case.
329329
* Type members are always assumed to match.
330330
*/
@@ -595,7 +595,7 @@ object RefChecks {
595595
clazz.nonPrivateMembersNamed(mbr.name)
596596
.filterWithPredicate(
597597
impl => isConcrete(impl.symbol)
598-
&& mbrDenot.matchesLoosely(impl, alwaysCompareParams = true))
598+
&& mbrDenot.matchesLoosely(impl, alwaysCompareTypes = true))
599599
.exists
600600

601601
/** The term symbols in this class and its baseclasses that are

0 commit comments

Comments
 (0)