Skip to content

Commit de074d9

Browse files
committed
Drop unused name tags
Drop unused AvoidClashName name kind and name tags AVIDCLASH and DIRECT
1 parent 800251d commit de074d9

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

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
@@ -851,7 +851,7 @@ trait Checking {
851851
typr.println(i"check no double declarations $cls")
852852

853853
def checkDecl(decl: Symbol): Unit = {
854-
for (other <- seen(decl.name) if (!decl.isAbsent() && !other.isAbsent())) {
854+
for (other <- seen(decl.name) if !decl.isAbsent() && !other.isAbsent()) {
855855
typr.println(i"conflict? $decl $other")
856856
def javaFieldMethodPair =
857857
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)