[K/N] Fix for instantiating annotations from already lowered file
If annotation class is already lowered, it can have more than one constructor. So we should use primary one, not any one. ^KT-53475
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ internal class NativeAnnotationImplementationTransformer(context: Context, irFil
|
||||
properties.forEach { property ->
|
||||
generatedConstructor.addValueParameter(property.name.asString(), property.getter!!.returnType)
|
||||
}
|
||||
createConstructorBody(generatedConstructor, annotationClass.constructors.single())
|
||||
createConstructorBody(generatedConstructor, annotationClass.primaryConstructor ?: error("Annotation class does not have primary constructor"))
|
||||
}
|
||||
|
||||
private fun createConstructorBody(constructor: IrConstructor, delegate: IrConstructor) {
|
||||
|
||||
Reference in New Issue
Block a user