Kapt+JVM_IR: do not generate secondary constructor bodies
In addition to ceedad40f3, do not generate bodies of constructors which
delegate to super.
#KT-58226 Fixed
This commit is contained in:
committed by
Space Team
parent
ba08f2c08a
commit
530725c6bf
+19
@@ -0,0 +1,19 @@
|
||||
@kotlin.Metadata()
|
||||
public enum Foo {
|
||||
/*public static final*/ BLA /* = new Foo() */;
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String bla = null;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBla() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Foo(java.lang.String bla) {
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public static kotlin.enums.EnumEntries<Foo> getEntries() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
enum class Foo {
|
||||
BLA("bla");
|
||||
|
||||
val bla: String
|
||||
|
||||
constructor(bla: String) {
|
||||
this.bla = bla
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
@kotlin.Metadata()
|
||||
public enum Foo {
|
||||
/*public static final*/ BLA /* = new Foo() */;
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String bla = null;
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getBla() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Foo(java.lang.String bla) {
|
||||
}
|
||||
}
|
||||
+6
@@ -181,6 +181,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumSecondaryConstructor.kt")
|
||||
public void testEnumSecondaryConstructor() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
|
||||
+6
@@ -181,6 +181,12 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enumSecondaryConstructor.kt")
|
||||
public void testEnumSecondaryConstructor() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/enumSecondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user