diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-01-10 23:26:02 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-01-11 13:51:32 +0100 |
commit | 50268a1847d58deeb65c3a762e0b99b2d99ccb67 (patch) | |
tree | 9776ffa111ef1b98d138294e57cd313929a8c6ff /compiler/src/dotty/tools | |
parent | be6464366fdbccc12623970445d8d5e8deff3f3f (diff) | |
download | dotty-50268a1847d58deeb65c3a762e0b99b2d99ccb67.tar.gz dotty-50268a1847d58deeb65c3a762e0b99b2d99ccb67.tar.bz2 dotty-50268a1847d58deeb65c3a762e0b99b2d99ccb67.zip |
Partially fix Java interop for emitted inner classes
The backend uses `rawname` to define the "inner name" of an InnerClass
entry in a classfile, this should be the simple name of the class before
any mangling takes place.
Fixing this allows Java code to reference dotty inner classes, except if
they're defined in objects which is still broken until
https://github.com/DarkDimius/scala/pull/4 is merged and a new backend
is published.
Diffstat (limited to 'compiler/src/dotty/tools')
-rw-r--r-- | compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index c17a32744..51fa15706 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -560,7 +560,10 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma def javaBinaryName: Name = toDenot(sym).fullNameSeparated("/") // addModuleSuffix(fullNameInternal('/')) def javaClassName: String = toDenot(sym).fullName.toString// addModuleSuffix(fullNameInternal('.')).toString def name: Name = sym.name - def rawname: Name = sym.name // todo ???? + def rawname: Name = { + val original = toDenot(sym).initial + sym.name(ctx.withPhase(original.validFor.phaseId)) + } // types def info: Type = toDenot(sym).info |