[LL FIR] pull up custom logic for synthetic properties and accessors

We should process them independently as they can be not related to each
other

^KT-65563 Fixed
This commit is contained in:
Dmitrii Gridin
2024-02-06 17:33:53 +01:00
committed by Space Team
parent 403e9a3df8
commit c52b9032ce
8 changed files with 437 additions and 3 deletions
@@ -10,6 +10,8 @@ import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.FirSessionComponent
import org.jetbrains.kotlin.fir.declarations.FirClass
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticPropertyAccessor
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
/**
@@ -95,7 +97,14 @@ fun FirBasedSymbol<*>.lazyResolveToPhase(toPhase: FirResolvePhase) {
* @see lazyResolveToPhase
*/
fun FirElementWithResolveState.lazyResolveToPhase(toPhase: FirResolvePhase) {
lazyDeclarationResolver.lazyResolveToPhase(this, toPhase)
when (this) {
is FirSyntheticPropertyAccessor -> delegate.lazyResolveToPhase(toPhase)
is FirSyntheticProperty -> {
getter.lazyResolveToPhase(toPhase)
setter?.lazyResolveToPhase(toPhase)
}
else -> lazyDeclarationResolver.lazyResolveToPhase(this, toPhase)
}
}
/**