[LL FIR] fix lazy resolution of member-property statuses for local classes

Previously, statuses of superclass which are not local was not ignored

Sometimes it worked in the IDE by calling lazyResolveToPhase
which is a violation of the lazy resolution contract

^KT-54890
This commit is contained in:
Ilya Kirillov
2022-12-01 16:45:36 +01:00
parent 1550a37b17
commit c66fbf5c0e
8 changed files with 79 additions and 51 deletions
@@ -26,7 +26,7 @@ internal class LLFirDesignatedStatusResolveTransformer(
private val scopeSession: ScopeSession,
) : LLFirLazyTransformer {
private inner class FirDesignatedStatusResolveTransformerForIDE :
FirStatusResolveTransformer(session, scopeSession, StatusComputationSession.Regular()) {
FirStatusResolveTransformer(session, scopeSession, StatusComputationSession()) {
val designationTransformer = LLFirDeclarationTransformer(designation)
@@ -3163,6 +3163,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/implicitInLocalClasses.kt");
}
@Test
@TestMetadata("overrideInLocal.kt")
public void testOverrideInLocal() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolve/localClasses/overrideInLocal.kt");
}
@Test
@TestMetadata("typesFromSuperClasses.kt")
public void testTypesFromSuperClasses() throws Exception {