Skip to content

Commit 9247e72

Browse files
committed
Drop unused name tags
Drop unused AvoidClashName name kind and name tags AVIDCLASH and DIRECT
1 parent b08d746 commit 9247e72

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ object NameKinds {
353353
val ProtectedAccessorName: PrefixNameKind = new PrefixNameKind(PROTECTEDACCESSOR, "protected$")
354354
val InlineAccessorName: PrefixNameKind = new PrefixNameKind(INLINEACCESSOR, "inline$")
355355

356-
val AvoidClashName: SuffixNameKind = new SuffixNameKind(AVOIDCLASH, "$_avoid_name_clash_$")
357356
val FieldName: SuffixNameKind = new SuffixNameKind(FIELD, "$$local") {
358357
override def mkString(underlying: TermName, info: ThisInfo) = underlying.toString
359358
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ object NameOps {
128128
/** If flags is a ModuleClass but not a Package, add module class suffix */
129129
def adjustIfModuleClass(flags: FlagSet): N = likeSpacedN {
130130
if (flags.is(ModuleClass, butNot = Package)) name.asTypeName.moduleClassName
131-
else name.toTermName.exclude(AvoidClashName)
131+
else name.toTermName
132132
}
133133

134134
/** The expanded name.

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ object NameTags extends TastyFormat.NameTags {
1717

1818
final val INITIALIZER = 26 // A mixin initializer method
1919

20-
final val AVOIDCLASH = 27 // Adds a suffix to avoid a name clash;
21-
// Used in FirstTransform for synthesized companion objects of classes
22-
// if they would clash with another value.
23-
24-
final val DIRECT = 28 // Used by ShortCutImplicits for the name of methods that
25-
// implement implicit function result types directly.
26-
2720
final val FIELD = 29 // Used by Memoize to tag the name of a class member field.
2821

2922
final val EXTMETH = 30 // Used by ExtensionMethods for the name of an extension method
@@ -51,8 +44,6 @@ object NameTags extends TastyFormat.NameTags {
5144
case INLINEACCESSOR => "INLINEACCESSOR"
5245
case PROTECTEDACCESSOR => "PROTECTEDACCESSOR"
5346
case INITIALIZER => "INITIALIZER"
54-
case AVOIDCLASH => "AVOIDCLASH"
55-
case DIRECT => "DIRECT"
5647
case FIELD => "FIELD"
5748
case EXTMETH => "EXTMETH"
5849
case IMPLMETH => "IMPLMETH"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ object SymDenotations {
282282
*/
283283
def effectiveName(implicit ctx: Context): Name =
284284
if (this.is(ModuleClass)) name.stripModuleClassSuffix
285-
else name.exclude(AvoidClashName)
285+
else name
286286

287287
/** The privateWithin boundary, NoSymbol if no boundary is given.
288288
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ trait Checking {
883883
typr.println(i"check no double declarations $cls")
884884

885885
def checkDecl(decl: Symbol): Unit = {
886-
for (other <- seen(decl.name) if (!decl.isAbsent() && !other.isAbsent())) {
886+
for (other <- seen(decl.name) if !decl.isAbsent() && !other.isAbsent()) {
887887
typr.println(i"conflict? $decl $other")
888888
def javaFieldMethodPair =
889889
decl.is(JavaDefined) && other.is(JavaDefined) &&

library/src/scala/annotation/internal/Child.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package scala.annotation.internal
2-
3-
import scala.annotation.Annotation
1+
package scala.annotation
2+
package internal
43

54
/** An annotation to indicate a child class or object of the annotated class.
65
* E.g. if we have

0 commit comments

Comments
 (0)