Kapt+JVM_IR: do not generate super constructor call
#KT-57699 Fixed #KT-57939 Fixed
This commit is contained in:
committed by
Space Team
parent
3cdf4bae07
commit
287e0909cc
+2
-1
@@ -244,7 +244,8 @@ internal class FunctionGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
) { irConstructor ->
|
||||
if (
|
||||
primaryConstructorDescriptor.isExpect ||
|
||||
primaryConstructorDescriptor.constructedClass.isEffectivelyExternal()
|
||||
primaryConstructorDescriptor.constructedClass.isEffectivelyExternal() ||
|
||||
context.configuration.skipBodies
|
||||
)
|
||||
null
|
||||
else
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
|
||||
@file:Suppress("UNRESOLVED_REFERENCE")
|
||||
|
||||
package test
|
||||
|
||||
abstract class A(val s: String)
|
||||
|
||||
class B : A(C.foo())
|
||||
@@ -0,0 +1,29 @@
|
||||
package test;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract class A {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final java.lang.String s = null;
|
||||
|
||||
public A(@org.jetbrains.annotations.NotNull()
|
||||
java.lang.String s) {
|
||||
super();
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public final java.lang.String getS() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class B extends test.A {
|
||||
|
||||
public B() {
|
||||
super(null);
|
||||
}
|
||||
}
|
||||
+6
@@ -607,6 +607,12 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superConstructorCall.kt")
|
||||
public void testSuperConstructorCall() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/superConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendArgName.kt")
|
||||
public void testSuspendArgName() throws Exception {
|
||||
|
||||
+6
@@ -607,6 +607,12 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superConstructorCall.kt")
|
||||
public void testSuperConstructorCall() throws Exception {
|
||||
runTest("plugins/kapt3/kapt3-compiler/testData/converter/superConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendArgName.kt")
|
||||
public void testSuspendArgName() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user