PSI2IR: don't generate annotations on init block (related to KT-48687)

This commit is contained in:
Mikhail Glukhikh
2021-09-09 16:04:52 +03:00
parent 457a6f4e9d
commit f397553e94
6 changed files with 4 additions and 63 deletions
@@ -39,6 +39,9 @@ class AnnotationGenerator(context: GeneratorContext) : IrElementVisitorVoid {
// front-end (incorrectly) copies annotations from corresponding interface members.
if (declaration is IrProperty && declaration.origin == IrDeclarationOrigin.DELEGATED_MEMBER) return
// Don't generate annotations for anonymous initializers
if (declaration is IrAnonymousInitializer) return
// Delegate field is mapped to a new property descriptor with annotations of the original property delegate
// (see IrPropertyDelegateDescriptorImpl), but annotations on backing fields should be processed manually here
val annotatedDescriptor =