[K/N] Get rid of using base class default values for annotations

They can be not available in incremental compilation case

^KT-50211
This commit is contained in:
Pavel Kunyavskiy
2021-12-23 17:21:06 +03:00
committed by Space
parent 473c6427be
commit 2f853175c7
4 changed files with 57 additions and 17 deletions
@@ -41,6 +41,10 @@ class JvmAnnotationImplementationTransformer(val jvmContext: JvmBackendContext,
private val inInlineFunctionScope: Boolean
get() = allScopes.any { it.irElement.safeAs<IrDeclaration>()?.isInPublicInlineScope == true }
@Suppress("UNUSED_PARAMETER")
override fun chooseConstructor(implClass: IrClass, expression: IrConstructorCall) =
implClass.constructors.single()
override fun visitConstructorCall(expression: IrConstructorCall): IrExpression {
val constructedClass = expression.type.classOrNull
if (constructedClass?.owner?.isAnnotationClass == true && inInlineFunctionScope) {