[Analysis API] Fix Unexpected FirClassLikeSymbol null for class org.jetbrains.kotlin.fir.types.ConeClassLikeErrorLookupTag exception

on calling `asPsiType` on an unresolved type with type arguments

 ^KT-65550 fixed
This commit is contained in:
Ilya Kirillov
2024-02-05 14:52:17 +01:00
committed by Space Team
parent 50d526fe91
commit d925d3be76
6 changed files with 123 additions and 0 deletions
@@ -1426,6 +1426,11 @@ class KotlinTypeMapper @JvmOverloads constructor(
SimpleClassicTypeSystemContext.hasNothingInNonContravariantPosition(kotlinType)
fun TypeSystemContext.hasNothingInNonContravariantPosition(type: KotlinTypeMarker): Boolean {
if (type.isError()) {
// We cannot access type arguments for an unresolved type
return false
}
val typeConstructor = type.typeConstructor()
for (i in 0 until type.argumentsCount()) {