diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-31 09:50:28 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:12 +0200 |
commit | 0ffa6d865b7a77b2d0a44306691c767d47ab4e08 (patch) | |
tree | d579c898a2812936d612497dc3390843fc567552 | |
parent | 1c1355994a66d2af714de5cc033da0a27abe146e (diff) | |
download | dotty-0ffa6d865b7a77b2d0a44306691c767d47ab4e08.tar.gz dotty-0ffa6d865b7a77b2d0a44306691c767d47ab4e08.tar.bz2 dotty-0ffa6d865b7a77b2d0a44306691c767d47ab4e08.zip |
Fix dropModule logic
-rw-r--r-- | compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameOps.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index 7ef6b7ef9..db4a0c694 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -557,7 +557,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma def fullName: String = sym.showFullName def simpleName: Name = sym.name def javaSimpleName: Name = toDenot(sym).name // addModuleSuffix(simpleName.dropLocal) - def javaBinaryName: Name = javaClassName.replace('.', '/').toTermName // TODO: can we make this a string? addModuleSuffix(fullNameInternal('/')) + def javaBinaryName: Name = javaClassName.replace('.', '/').toTypeName // TODO: can we make this a string? addModuleSuffix(fullNameInternal('/')) def javaClassName: String = toDenot(sym).fullName.toString// addModuleSuffix(fullNameInternal('.')).toString def name: Name = sym.name def rawname: Name = { diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index ac6bfcca3..39981543d 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -111,8 +111,8 @@ object NameOps { * method needs to work on mangled as well as unmangled names because * it is also called from the backend. */ - def stripModuleClassSuffix: Name = name match { - case name: SimpleTermName if name.endsWith("$") => + def stripModuleClassSuffix: Name = name.toTermName match { + case n: SimpleTermName if n.endsWith("$") => name.unmangleClassName.exclude(ModuleClassName) case _ => name.exclude(ModuleClassName) |