aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/Erasure.scala3
-rw-r--r--compiler/src/dotty/tools/dotc/transform/FirstTransform.scala4
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/Erasure.scala b/compiler/src/dotty/tools/dotc/transform/Erasure.scala
index d64120085..e9fe42e78 100644
--- a/compiler/src/dotty/tools/dotc/transform/Erasure.scala
+++ b/compiler/src/dotty/tools/dotc/transform/Erasure.scala
@@ -11,6 +11,7 @@ import core.Types._
import core.Names._
import core.StdNames._
import core.NameOps._
+import core.NameExtractors.ShadowedName
import core.Decorators._
import core.Constants._
import core.Definitions._
@@ -363,7 +364,7 @@ object Erasure extends TypeTestsCasts{
def select(qual: Tree, sym: Symbol): Tree = {
val name = tree.typeOpt match {
- case tp: NamedType if tp.name.isShadowedName => sym.name.shadowedName
+ case tp: NamedType if tp.name.is(ShadowedName) => sym.name.derived(ShadowedName)
case _ => sym.name
}
untpd.cpy.Select(tree)(qual, sym.name)
diff --git a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala
index 8328e43de..803504944 100644
--- a/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala
+++ b/compiler/src/dotty/tools/dotc/transform/FirstTransform.scala
@@ -19,8 +19,8 @@ import dotty.tools.dotc.core.Denotations.SingleDenotation
import scala.collection.mutable
import DenotTransformers._
import typer.Checking
-import Names.Name
import NameOps._
+import NameExtractors.AvoidClashName
import StdNames._
@@ -129,7 +129,7 @@ class FirstTransform extends MiniPhaseTransform with InfoTransformer with Annota
case _ =>
false
}
- val uniqueName = if (nameClash) objName.avoidClashName else objName
+ val uniqueName = if (nameClash) AvoidClashName(objName) else objName
Thicket(stat :: ModuleDef(registerCompanion(uniqueName, stat.symbol), Nil).trees)
case stat => stat
}