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:
committed by
Alexander Udalov
parent
5321a6af33
commit
8e07482862
@@ -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
|
||||
Reference in New Issue
Block a user