[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:
committed by
Space Team
parent
641b5d5fa7
commit
3ea1f7851b
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user