Skip to content

Commit 3b096f6

Browse files
committed
Fix dropModule logic
1 parent 00dee16 commit 3b096f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
557557
def fullName: String = sym.showFullName
558558
def simpleName: Name = sym.name
559559
def javaSimpleName: Name = toDenot(sym).name // addModuleSuffix(simpleName.dropLocal)
560-
def javaBinaryName: Name = javaClassName.replace('.', '/').toTermName // TODO: can we make this a string? addModuleSuffix(fullNameInternal('/'))
560+
def javaBinaryName: Name = javaClassName.replace('.', '/').toTypeName // TODO: can we make this a string? addModuleSuffix(fullNameInternal('/'))
561561
def javaClassName: String = toDenot(sym).fullName.toString// addModuleSuffix(fullNameInternal('.')).toString
562562
def name: Name = sym.name
563563
def rawname: Name = {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ object NameOps {
111111
* method needs to work on mangled as well as unmangled names because
112112
* it is also called from the backend.
113113
*/
114-
def stripModuleClassSuffix: Name = name match {
115-
case name: SimpleTermName if name.endsWith("$") =>
114+
def stripModuleClassSuffix: Name = name.toTermName match {
115+
case n: SimpleTermName if n.endsWith("$") =>
116116
name.unmangleClassName.exclude(ModuleClassName)
117117
case _ =>
118118
name.exclude(ModuleClassName)

0 commit comments

Comments
 (0)