JVM_IR: do not generate two nullary constructors
when the primary constructor with @JvmOverloads has default values for all arguments.
This commit is contained in:
@@ -115,7 +115,6 @@ val jvmPhases = namedIrFilePhase<JvmBackendContext>(
|
||||
annotationPhase then
|
||||
tailrecPhase then
|
||||
|
||||
jvmDefaultConstructorPhase then
|
||||
jvmInlineClassPhase then
|
||||
defaultArgumentStubPhase then
|
||||
|
||||
@@ -146,6 +145,7 @@ val jvmPhases = namedIrFilePhase<JvmBackendContext>(
|
||||
collectionStubMethodLowering then
|
||||
bridgePhase then
|
||||
jvmOverloadsAnnotationPhase then
|
||||
jvmDefaultConstructorPhase then
|
||||
jvmStaticAnnotationPhase then
|
||||
staticDefaultFunctionPhase then
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ import org.jetbrains.kotlin.ir.util.hasDefaultValue
|
||||
internal val jvmDefaultConstructorPhase = makeIrFilePhase(
|
||||
::JvmDefaultConstructorLowering,
|
||||
name = "JvmDefaultConstructor",
|
||||
description = "Generate default constructors for Java"
|
||||
description = "Generate default constructors for Java",
|
||||
prerequisite = setOf(jvmOverloadsAnnotationPhase)
|
||||
)
|
||||
|
||||
// Quoted from https://kotlinlang.org/docs/reference/classes.html
|
||||
|
||||
Reference in New Issue
Block a user