[FIR] fix resolve contract violation from scopes

We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
This commit is contained in:
Ilya Kirillov
2022-12-28 09:59:12 +01:00
committed by teamcity
parent 0d1e7e83b5
commit 1bbcae5ed2
311 changed files with 108 additions and 347 deletions
@@ -207,7 +207,8 @@ abstract class AbstractAnnotationDeserializer(
val firAnnotationClass = (symbol as? FirRegularClassSymbol)?.fir ?: return@lazy null
val classScope =
firAnnotationClass.defaultType().scope(session, ScopeSession(), FakeOverrideTypeCalculator.DoNothing)
firAnnotationClass.defaultType()
.scope(session, ScopeSession(), FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
?: error("Null scope for $classId")
val constructor =