Add declarations from serialization plugin to FIR metadata declarations provider.

These declarations should not be visible to users (and therefore are not added to FIR),
but plugin itself can reference them in already compiled serializable classes,
and therefore they should be available in metadata:

- synthetic deserialization constructor
- static write$Self function

See also:
^KT-55885
This commit is contained in:
Leonid Startsev
2023-02-15 18:47:37 +01:00
committed by Space Team
parent 8953b25c5b
commit c564dd973b
8 changed files with 215 additions and 19 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -37,7 +37,7 @@ class Fir2IrLazyProperty(
override val endOffset: Int,
override var origin: IrDeclarationOrigin,
override val fir: FirProperty,
internal val containingClass: FirRegularClass?,
val containingClass: FirRegularClass?,
override val symbol: Fir2IrPropertySymbol,
override val isFakeOverride: Boolean
) : IrProperty(), AbstractFir2IrLazyDeclaration<FirProperty>, Fir2IrComponents by components {