[FIR] add missing resolve to isFinalClassConstructor

fix checking for intersection types in CheckIncompatibleTypeVariableUpperBounds

we need this resolve, because getEmptyIntersectionTypeKind under
the hood uses org.jetbrains.kotlin.resolve.checkers.EmptyIntersectionTypeChecker.computeEmptyIntersectionEmptiness
which uses computeByHavingCommonSubtype where we have
isFinalClassConstructor() call, so we need to resolve to STATUS phase
to get the correct modality

^KT-56543
This commit is contained in:
Dmitrii Gridin
2023-03-29 13:07:01 +02:00
committed by Space Team
parent 641b5d5fa7
commit 3ea1f7851b
5 changed files with 3 additions and 6 deletions
@@ -303,7 +303,7 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
val symbol = toClassLikeSymbol() ?: return false
if (symbol is FirAnonymousObjectSymbol) return true
val classSymbol = symbol as? FirRegularClassSymbol ?: return false
return classSymbol.fir.modality == Modality.FINAL
return classSymbol.modality == Modality.FINAL
}
override fun TypeVariableMarker.freshTypeConstructor(): TypeConstructorMarker {