JVM IR: Fix generation of parameterless default constructor

The JVM backend does not generate parameterless default constructors for
private constructors and constructors of local, inner, or inline
classes.
This commit is contained in:
Steven Schäfer
2020-01-13 16:11:14 +01:00
committed by Alexander Udalov
parent 5321a6af33
commit 8e07482862
12 changed files with 217 additions and 3 deletions
@@ -0,0 +1,15 @@
enum class Enum(val x: Int = 0) {
A,
B(0) { override fun f() {} };
open fun f() {}
}
// @Enum.class:
// 0 <init>\(\)V
// 1 private <init>\(Ljava/lang/String;II\)V
// 1 synthetic <init>\(Ljava/lang/String;IIILkotlin/jvm/internal/DefaultConstructorMarker;\)V
// 1 public synthetic <init>\(Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;\)V
// @Enum$B.class:
// 0 <init>\(\)V
// 1 <init>\(Ljava/lang/String;I\)V