[IR] Move annotations from original to new constructor declarations.

LocalDeclarationsLowering did not move annotations when creating
a new constructor declaration, thereby losing the annotations.

Fixes KT-45298
This commit is contained in:
Mads Ager
2021-03-04 14:45:03 +01:00
committed by Alexander Udalov
parent 965c118521
commit e5631addf3
6 changed files with 44 additions and 0 deletions
@@ -726,6 +726,8 @@ class LocalDeclarationsLowering(
)
newDeclaration.recordTransformedValueParameters(constructorContext)
newDeclaration.annotations = oldDeclaration.annotations
newDeclaration.metadata = oldDeclaration.metadata
transformedDeclarations[oldDeclaration] = newDeclaration