JVM_IR: Remove accessor for internal inline class properties.

This commit is contained in:
Mads Ager
2020-01-03 13:31:37 +01:00
committed by Alexander Udalov
parent d27593aeda
commit 2ebb797e61
2 changed files with 4 additions and 3 deletions
@@ -78,8 +78,10 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
if (declaration.isInline) {
val irConstructor = declaration.primaryConstructor!!
// The field getter is used by reflection and cannot be removed here.
declaration.declarations.remove(irConstructor)
// The field getter is used by reflection and cannot be removed here unless it is internal.
declaration.declarations.removeIf {
it == irConstructor || (it is IrFunction && it.isInlineClassFieldGetter && !it.visibility.isPublicAPI)
}
buildPrimaryInlineClassConstructor(declaration, irConstructor)
buildBoxFunction(declaration)
buildUnboxFunction(declaration)
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT