Kapt: Do not use awkward ('$' -> '/') logic for KAPT3 class builder mode

So (for the most often reproduction case) #KT-19433 Fixed

Before this commit, internal names for nested classes were written as test/Foo/Bar (comparing to test/Foo$Bar in the normal mode), as getting qualified names from such internal names was trivial. But, because of IC, we needed to write class files to the disk, so our decompiler could find such "broken" classes and read it in a wrong way.
This commit is contained in:
Yan Zhulanow
2017-08-11 17:36:28 +05:00
committed by Mikhail Glukhikh
parent e5e5b56af0
commit 57d209f599
18 changed files with 708 additions and 83 deletions
+32 -32
View File
@@ -1,23 +1,6 @@
@kotlin.Metadata
public final class test/TopLevel {
public final static field Companion: test.TopLevel.Companion
private final static @org.jetbrains.annotations.NotNull field q: java.lang.String
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
private final field y: int
inner class test/TopLevel/Companion
inner class test/TopLevel/InnerInterface
inner class test/TopLevel/InnerObject
inner class test/TopLevel/NestedClass
public method <init>(): void
public final method b(): void
public final static @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
public final method getY(): int
}
@kotlin.Metadata
public final class test/TopLevel/Companion {
inner class test/TopLevel/Companion
public final class test/TopLevel$Companion {
inner class test/TopLevel$Companion
private method <init>(): void
public final method a(): void
public final @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
@@ -25,28 +8,45 @@ public final class test/TopLevel/Companion {
}
@kotlin.Metadata
public interface test/TopLevel/InnerInterface {
inner class test/TopLevel/InnerInterface
public interface test/TopLevel$InnerInterface {
inner class test/TopLevel$InnerInterface
}
@kotlin.Metadata
public final class test/TopLevel/InnerObject {
public final static field INSTANCE: test.TopLevel.InnerObject
inner class test/TopLevel/InnerObject
public final class test/TopLevel$InnerObject {
public final static field INSTANCE: test.TopLevel$InnerObject
inner class test/TopLevel$InnerObject
private method <init>(): void
}
@kotlin.Metadata
public final class test/TopLevel/NestedClass {
inner class test/TopLevel/NestedClass
inner class test/TopLevel/NestedClass/NestedInnerClass
public final class test/TopLevel$NestedClass$NestedInnerClass {
synthetic final field this$0: test.TopLevel$NestedClass
inner class test/TopLevel$NestedClass
inner class test/TopLevel$NestedClass$NestedInnerClass
public method <init>(p0: test.TopLevel$NestedClass): void
}
@kotlin.Metadata
public final class test/TopLevel$NestedClass {
inner class test/TopLevel$NestedClass
inner class test/TopLevel$NestedClass$NestedInnerClass
public method <init>(): void
}
@kotlin.Metadata
public final class test/TopLevel/NestedClass/NestedInnerClass {
synthetic final field this$0: test.TopLevel.NestedClass
inner class test/TopLevel/NestedClass
inner class test/TopLevel/NestedClass/NestedInnerClass
public method <init>(p0: test.TopLevel.NestedClass): void
public final class test/TopLevel {
public final static field Companion: test.TopLevel$Companion
private final static @org.jetbrains.annotations.NotNull field q: java.lang.String
private final @org.jetbrains.annotations.NotNull field x: java.lang.String
private final field y: int
inner class test/TopLevel$Companion
inner class test/TopLevel$InnerInterface
inner class test/TopLevel$InnerObject
inner class test/TopLevel$NestedClass
public method <init>(): void
public final method b(): void
public final static @org.jetbrains.annotations.NotNull method getQ(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
public final method getY(): int
}
+7 -7
View File
@@ -1,14 +1,14 @@
@kotlin.Metadata
public interface A {
inner class A/DefaultImpls
public abstract method a(): void
public abstract method b(): void
public final class A$DefaultImpls {
inner class A$DefaultImpls
public static method a(p0: A): void
}
@kotlin.Metadata
public final class A/DefaultImpls {
inner class A/DefaultImpls
public static method a(p0: A): void
public interface A {
inner class A$DefaultImpls
public abstract method a(): void
public abstract method b(): void
}
@kotlin.Metadata