@@ -352,7 +352,7 @@ object Denotations {
352352 */
353353 def matchingDenotation (site : Type , targetType : Type , targetName : Name )(using Context ): SingleDenotation = {
354354 def qualifies (sym : Symbol ) =
355- site.memberInfo(sym).matchesLoosely(targetType) && targetNamesMatch( sym.targetName, targetName)
355+ site.memberInfo(sym).matchesLoosely(targetType) && sym.hasTargetName( targetName)
356356 if (isOverloaded)
357357 atSignature(targetType.signature, targetName, site, relaxed = true ) match {
358358 case sd : SingleDenotation => sd.matchingDenotation(site, targetType, targetName)
@@ -624,8 +624,7 @@ object Denotations {
624624 relaxed
625625 case noMatch =>
626626 false
627- if sigMatches && targetNamesMatch(symbol.targetName, targetName) then this
628- else NoDenotation
627+ if sigMatches && symbol.hasTargetName(targetName) then this else NoDenotation
629628
630629 def matchesImportBound (bound : Type )(using Context ): Boolean =
631630 if bound.isRef(defn.NothingClass ) then false
@@ -986,7 +985,7 @@ object Denotations {
986985 final def last : SingleDenotation = this
987986
988987 def matches (other : SingleDenotation )(using Context ): Boolean =
989- targetNamesMatch( symbol.targetName, other.symbol.targetName)
988+ symbol.hasTargetName( other.symbol.targetName)
990989 && {
991990 val d = signature.matchDegree(other.signature)
992991 d match
@@ -1285,7 +1284,4 @@ object Denotations {
12851284 util.Stats .record(" stale symbol" )
12861285 override def getMessage (): String = msg
12871286 }
1288-
1289- def targetNamesMatch (name1 : Name , name2 : Name ): Boolean =
1290- name1 == name2 || name1.isEmpty || name2.isEmpty
12911287}
0 commit comments