[Commonizer] Fix property backing/delegate field annotations serialization
This commit is contained in:
@@ -151,6 +151,7 @@ internal fun CirProperty.buildProperty(
|
||||
getterFlags = getter?.propertyAccessorFlags(this, this) ?: NO_FLAGS,
|
||||
setterFlags = setter?.let { setter -> setter.propertyAccessorFlags(setter, this) } ?: NO_FLAGS
|
||||
).also { property ->
|
||||
// TODO unclear where to write backing/delegate field annotations, see KT-44625
|
||||
annotations.mapTo(property.annotations) { it.buildAnnotation() }
|
||||
getter?.annotations?.mapTo(property.getterAnnotations) { it.buildAnnotation() }
|
||||
setter?.annotations?.mapTo(property.setterAnnotations) { it.buildAnnotation() }
|
||||
|
||||
@@ -104,6 +104,12 @@ internal fun CirTypeAlias.typeAliasFlags(): Flags =
|
||||
private inline val CirHasAnnotations.hasAnnotationsFlag: Flag?
|
||||
get() = if (annotations.isNotEmpty()) Flag.Common.HAS_ANNOTATIONS else null
|
||||
|
||||
private inline val CirProperty.hasAnnotationsFlag: Flag?
|
||||
get() = if (annotations.isNotEmpty() || !backingFieldAnnotations.isNullOrEmpty() || !delegateFieldAnnotations.isNullOrEmpty())
|
||||
Flag.Common.HAS_ANNOTATIONS
|
||||
else
|
||||
null
|
||||
|
||||
private inline val CirHasVisibility.visibilityFlag: Flag
|
||||
get() = when (visibility) {
|
||||
DescriptorVisibilities.PUBLIC -> Flag.Common.IS_PUBLIC
|
||||
|
||||
Reference in New Issue
Block a user