K2: fix exception in deserializer for external setter #KT-53031 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-07-12 17:01:14 +02:00
committed by Space
parent 1336ec6a0b
commit 70e15b281c
4 changed files with 31 additions and 4 deletions
@@ -287,10 +287,7 @@ class FirElementSerializer private constructor(
}
val nonSourceAnnotations = setter.nonSourceAnnotations(session, property)
if (setter !is FirDefaultPropertyAccessor ||
nonSourceAnnotations.isNotEmpty() ||
setter.visibility != property.visibility
) {
if (Flags.IS_NOT_DEFAULT.get(accessorFlags)) {
val setterLocal = local.createChildSerializer(setter)
for (valueParameterDescriptor in setter.valueParameters) {
val annotations = nonSourceAnnotations.filter { it.useSiteTarget == AnnotationUseSiteTarget.SETTER_PARAMETER }