[JVM IR] Copy inline class constructor annotations
This commit is contained in:
committed by
Dmitry Petrov
parent
678b76cab1
commit
8d79a6ae03
+1
@@ -474,6 +474,7 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
|
|||||||
// Don't create a default argument stub for the primary constructor
|
// Don't create a default argument stub for the primary constructor
|
||||||
irConstructor.valueParameters.forEach { it.defaultValue = null }
|
irConstructor.valueParameters.forEach { it.defaultValue = null }
|
||||||
copyParameterDeclarationsFrom(irConstructor)
|
copyParameterDeclarationsFrom(irConstructor)
|
||||||
|
annotations += irConstructor.annotations
|
||||||
body = context.createIrBuilder(this.symbol).irBlockBody(this) {
|
body = context.createIrBuilder(this.symbol).irBlockBody(this) {
|
||||||
+irDelegatingConstructorCall(context.irBuiltIns.anyClass.owner.constructors.single())
|
+irDelegatingConstructorCall(context.irBuiltIns.anyClass.owner.constructors.single())
|
||||||
+irSetField(
|
+irSetField(
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// !LANGUAGE: +InlineClasses
|
// !LANGUAGE: +InlineClasses
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
|
|
||||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||||
inline class Z @PublishedApi internal constructor(val value: Int)
|
inline class Z @PublishedApi internal constructor(val value: Int)
|
||||||
Reference in New Issue
Block a user