[LL FIR] drop extra withContainingClass from annotation transformers

This call is redundant for annotation transformers because
they are override withRegularClass and add this call there,
so, as result, we have a class duplication in
containingClassDeclarations

^KT-62587
This commit is contained in:
Dmitrii Gridin
2023-10-13 20:22:57 +02:00
committed by Space Team
parent 21f81a8057
commit 5298d79dec
2 changed files with 12 additions and 2 deletions
@@ -65,6 +65,14 @@ private class LLFirAnnotationArgumentsMappingTargetResolver(
transformAnnotations(target) transformAnnotations(target)
} }
} }
@Deprecated("Should never be called directly, only for override purposes, please use withRegularClass", level = DeprecationLevel.ERROR)
override fun withRegularClassImpl(firClass: FirRegularClass, action: () -> Unit) {
transformer.declarationsTransformer.withRegularClass(firClass) {
action()
firClass
}
}
} }
internal object AnnotationArgumentMappingStateKeepers { internal object AnnotationArgumentMappingStateKeepers {
@@ -87,8 +87,10 @@ private class LLFirAnnotationArgumentsTargetResolver(
collector.addDeclarationContext(firClass, context) collector.addDeclarationContext(firClass, context)
} }
@Suppress("DEPRECATION_ERROR") transformer.declarationsTransformer.withRegularClass(firClass) {
super.withRegularClassImpl(firClass, actionWithCollector) actionWithCollector()
firClass
}
} }
override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { override fun doLazyResolveUnderLock(target: FirElementWithResolveState) {