[Analysis API] separate non-class error types from class error types and add information about type qualifiers
it's needed for type printing in renderer
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ import com.intellij.psi.search.SearchScope
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.isValid
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtClassErrorType
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtErrorType
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtNonErrorClassType
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtTypeMappingMode
|
||||
import org.jetbrains.kotlin.asJava.classes.KotlinSuperTypeListBuilder
|
||||
@@ -67,7 +67,7 @@ internal class SymbolLightTypeParameter(
|
||||
.filter { type ->
|
||||
when (type) {
|
||||
is KtNonErrorClassType -> type.classId != StandardClassIds.Any
|
||||
is KtClassErrorType -> false
|
||||
is KtErrorType -> false
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ internal fun KtAnalysisSession.getTypeNullability(ktType: KtType): NullabilityTy
|
||||
}
|
||||
|
||||
if (ktType !is KtNonErrorClassType) return NullabilityType.NotNull
|
||||
if (ktType.typeArguments.any { it.type is KtClassErrorType }) return NullabilityType.NotNull
|
||||
if (ktType.ownTypeArguments.any { it.type is KtClassErrorType }) return NullabilityType.NotNull
|
||||
if (ktType.classId.shortClassName.asString() == SpecialNames.ANONYMOUS_STRING) return NullabilityType.NotNull
|
||||
|
||||
val canonicalSignature = ktType.mapTypeToJvmType().descriptor
|
||||
|
||||
Reference in New Issue
Block a user