[FIR] Unwrap typealias-bounds in FirTypeParameterBoundsChecker
This change makes sure the test introduced in the previous commit doesn't crash the compiler. ^KT-64644 Fixed
This commit is contained in:
committed by
Space Team
parent
7c3042772e
commit
533ed5c622
@@ -561,13 +561,14 @@ fun ConeKotlinType.canHaveSubtypes(session: FirSession): Boolean {
|
|||||||
if (this.isMarkedNullable) {
|
if (this.isMarkedNullable) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
val classSymbol = toRegularClassSymbol(session) ?: return true
|
val expandedType = fullyExpandedType(session)
|
||||||
|
val classSymbol = expandedType.toSymbol(session) as? FirRegularClassSymbol ?: return true
|
||||||
if (classSymbol.isEnumClass || classSymbol.isExpect || classSymbol.modality != Modality.FINAL) {
|
if (classSymbol.isEnumClass || classSymbol.isExpect || classSymbol.modality != Modality.FINAL) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
classSymbol.typeParameterSymbols.forEachIndexed { idx, typeParameterSymbol ->
|
classSymbol.typeParameterSymbols.forEachIndexed { idx, typeParameterSymbol ->
|
||||||
val typeProjection = typeArguments[idx]
|
val typeProjection = expandedType.typeArguments[idx]
|
||||||
|
|
||||||
if (typeProjection.isStarProjection) {
|
if (typeProjection.isStarProjection) {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user