JVM_IR: Remove accessor for internal inline class properties.
This commit is contained in:
committed by
Alexander Udalov
parent
d27593aeda
commit
2ebb797e61
+4
-2
@@ -78,8 +78,10 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
|
|||||||
|
|
||||||
if (declaration.isInline) {
|
if (declaration.isInline) {
|
||||||
val irConstructor = declaration.primaryConstructor!!
|
val irConstructor = declaration.primaryConstructor!!
|
||||||
// The field getter is used by reflection and cannot be removed here.
|
// The field getter is used by reflection and cannot be removed here unless it is internal.
|
||||||
declaration.declarations.remove(irConstructor)
|
declaration.declarations.removeIf {
|
||||||
|
it == irConstructor || (it is IrFunction && it.isInlineClassFieldGetter && !it.visibility.isPublicAPI)
|
||||||
|
}
|
||||||
buildPrimaryInlineClassConstructor(declaration, irConstructor)
|
buildPrimaryInlineClassConstructor(declaration, irConstructor)
|
||||||
buildBoxFunction(declaration)
|
buildBoxFunction(declaration)
|
||||||
buildUnboxFunction(declaration)
|
buildUnboxFunction(declaration)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_REFLECT
|
// WITH_REFLECT
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user