Skip to content

Commit d7eea41

Browse files
committed
Change some toString occurrences on Name to mangledString
These were caught when turning the backend check on.
1 parent b28f766 commit d7eea41

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class SymbolLoaders {
220220
if (!sourceModule.isCompleted)
221221
sourceModule.completer.complete(sourceModule)
222222

223-
val packageName = if (root.isEffectiveRoot) "" else root.fullName.toString
223+
val packageName = if (root.isEffectiveRoot) "" else root.fullName.mangledString
224224

225225
enterFlatClasses = Some { ctx =>
226226
enterFlatClasses = None

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ class ClassfileParser(
677677
for (entry <- innerClasses.values) {
678678
// create a new class member for immediate inner classes
679679
if (entry.outerName == currentClassName) {
680-
val file = ctx.platform.classPath.findClassFile(entry.externalName.toString) getOrElse {
680+
val file = ctx.platform.classPath.findClassFile(entry.externalName.mangledString) getOrElse {
681681
throw new AssertionError(entry.externalName)
682682
}
683683
enterClassAndModule(entry, file, entry.jflags)

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class TreeChecker extends Phase with SymTransformer {
6363
val NoSuperClass = Trait | Package
6464

6565
def testDuplicate(sym: Symbol, registry: mutable.Map[String, Symbol], typ: String)(implicit ctx: Context) = {
66-
val name = sym.fullName.toString
66+
val name = sym.fullName.mangledString
6767
if (this.flatClasses && registry.contains(name))
6868
printError(s"$typ defined twice $sym ${sym.id} ${registry(name).id}")
6969
registry(name) = sym

0 commit comments

Comments
 (0)