[LL FIR] LLFirCompilerAnnotationsLazyResolver: pass correct ScopeSession

We should use the declaration-site session to have stable
resolution order. The same scheme is applicable during
regular lazy resolution calls.

^KT-63547 Fixed
This commit is contained in:
Dmitrii Gridin
2023-12-19 15:12:52 +01:00
committed by Space Team
parent d83392a27a
commit 51f6525238
2 changed files with 3 additions and 5 deletions
@@ -1,4 +1 @@
Diagnostics from elements:
for PSI element of type KtAnnotationEntry at (34,1-12)
WRONG_ANNOTATION_TARGET text ranges: [(114,125)]
PSI: KtAnnotationEntry at (34,1-12)
@@ -69,11 +69,12 @@ private class LLFirCompilerRequiredAnnotationsTargetResolver(
symbol.lazyResolveToPhase(resolverPhase.previous)
val designation = regularClass.collectDesignationWithFile().asResolveTarget()
val targetSession = designation.target.llFirSession
val resolver = LLFirCompilerRequiredAnnotationsTargetResolver(
designation,
lockProvider,
designation.target.llFirSession,
scopeSession,
targetSession,
targetSession.getScopeSession(),
this,
)