Fix corner-cases in ConeTypeContext / FIR builder / FIR enhancements
This fixes a pack of FIR smoke diagnostic tests, now all of them pass Related to KT-29962
This commit is contained in:
@@ -146,7 +146,9 @@ private fun JavaClassifierType.enhanceInflexibleType(
|
||||
mappedId = mappedId.readOnlyToMutable() ?: mappedId
|
||||
}
|
||||
}
|
||||
session.service<FirSymbolProvider>().getClassLikeSymbolByFqName(mappedId ?: classId)!!
|
||||
val kotlinClassId = mappedId ?: classId
|
||||
session.service<FirSymbolProvider>().getClassLikeSymbolByFqName(kotlinClassId)
|
||||
?: return ConeClassErrorType("Cannot find class-like symbol for $kotlinClassId during enhancement")
|
||||
}
|
||||
is JavaTypeParameter -> createTypeParameterSymbol(session, classifier.name)
|
||||
else -> return toNotNullConeKotlinType(session)
|
||||
|
||||
+1
@@ -198,6 +198,7 @@ class JavaClassEnhancementScope(
|
||||
}
|
||||
|
||||
private fun StringBuilder.appendConeType(coneType: ConeKotlinType) {
|
||||
if (coneType is ConeClassErrorType) return
|
||||
append("L")
|
||||
when (coneType) {
|
||||
is ConeClassLikeType -> {
|
||||
|
||||
Reference in New Issue
Block a user