JVM_IR: Preserve annotations on inline class replacement methods.

This commit is contained in:
Mads Ager
2020-01-03 12:55:48 +01:00
committed by Alexander Udalov
parent e7835fecfc
commit 98f5c5aa95
3 changed files with 1 additions and 3 deletions
@@ -144,7 +144,6 @@ class MemoizedInlineClassReplacements {
val parameterMap = mutableMapOf<IrValueParameterSymbol, IrValueParameter>() val parameterMap = mutableMapOf<IrValueParameterSymbol, IrValueParameter>()
val replacement = buildReplacement(function) { val replacement = buildReplacement(function) {
annotations += function.annotations
metadata = function.metadata metadata = function.metadata
overriddenSymbols.addAll(overrides) overriddenSymbols.addAll(overrides)
@@ -203,6 +202,7 @@ class MemoizedInlineClassReplacements {
returnType = function.returnType returnType = function.returnType
}.apply { }.apply {
parent = function.parent parent = function.parent
annotations += function.annotations
if (function is IrConstructor) { if (function is IrConstructor) {
copyTypeParameters(function.constructedClass.typeParameters + function.typeParameters) copyTypeParameters(function.constructedClass.typeParameters + function.typeParameters)
} else { } else {
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// WITH_REFLECT // WITH_REFLECT
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses // !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
@file:Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @file:Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
package test package test