Skip to content

Commit 6eaa10e

Browse files
committed
Define NoSymbol.erasedName to be EmptyTermName
This will streamline some of the later matching code.
1 parent 118f419 commit 6eaa10e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ object SymDenotations {
496496
def fullName(using Context): Name = fullNameSeparated(QualifiedName)
497497

498498
/** The name given in a `@targetName` annotation if one is present, `name` otherwise */
499-
final def erasedName(using Context): Name =
499+
def erasedName(using Context): Name =
500500
val targetNameAnnot =
501501
if isAllOf(ModuleClass | Synthetic) then companionClass.getAnnotation(defn.TargetNameAnnot)
502502
else getAnnotation(defn.TargetNameAnnot)
@@ -2318,6 +2318,7 @@ object SymDenotations {
23182318
override def mapInfo(f: Type => Type)(using Context): SingleDenotation = this
23192319

23202320
override def matches(other: SingleDenotation)(using Context): Boolean = false
2321+
override def erasedName(using Context): Name = EmptyTermName
23212322
override def mapInherited(ownDenots: PreDenotation, prevDenots: PreDenotation, pre: Type)(using Context): SingleDenotation = this
23222323
override def filterWithPredicate(p: SingleDenotation => Boolean): SingleDenotation = this
23232324
override def filterDisjoint(denots: PreDenotation)(using Context): SingleDenotation = this

0 commit comments

Comments
 (0)