Skip to content

Commit

Permalink
Kapt+JVM_IR: do not generate super constructor call
Browse files Browse the repository at this point in the history
 #KT-57699 Fixed
 #KT-57939 Fixed

(cherry picked from commit 287e090)
  • Loading branch information
udalov authored and qodana-bot committed Apr 19, 2023
1 parent c98b2a7 commit 3be65ec
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ class FunctionGenerator(declarationGenerator: DeclarationGenerator) : Declaratio
) { irConstructor ->
if (
primaryConstructorDescriptor.isExpect ||
primaryConstructorDescriptor.constructedClass.isEffectivelyExternal()
primaryConstructorDescriptor.constructedClass.isEffectivelyExternal() ||
context.configuration.skipBodies
)
null
else
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// CORRECT_ERROR_TYPES

@file:Suppress("UNRESOLVED_REFERENCE")

package test

abstract class A(val s: String)

class B : A(C.foo())
Original file line number Diff line number Diff line change
@@ -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);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3be65ec

Please sign in to comment.