diff --git a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt index 2ff4cfc077..88a4644097 100644 --- a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt +++ b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/ResolverAAImpl.kt @@ -469,10 +469,6 @@ class ResolverAAImpl( // TODO: handle library symbols override fun getJvmName(accessor: KSPropertyAccessor): String { - if (accessor.receiver.closestClassDeclaration()?.classKind == ClassKind.ANNOTATION_CLASS) { - return accessor.receiver.simpleName.asString() - } - val symbol: KaPropertyAccessorSymbol? = when (accessor) { is KSPropertyAccessorImpl -> accessor.ktPropertyAccessorSymbol else -> null @@ -482,6 +478,10 @@ class ResolverAAImpl( return it } + if (accessor.receiver.closestClassDeclaration()?.classKind == ClassKind.ANNOTATION_CLASS) { + return accessor.receiver.simpleName.asString() + } + val prefix = if (accessor is KSPropertyGetter) { "get" } else {