[FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias
This commit is contained in:
committed by
teamcity
parent
9c6292db6f
commit
0bd3e8f418
@@ -54,7 +54,7 @@ private fun ConeKotlinType.contains(predicate: (ConeKotlinType) -> Boolean, visi
|
||||
|
||||
fun ConeClassLikeType.withArguments(typeArguments: Array<out ConeTypeProjection>): ConeClassLikeType = when (this) {
|
||||
is ConeClassLikeTypeImpl -> ConeClassLikeTypeImpl(lookupTag, typeArguments, isNullable, attributes)
|
||||
is ConeClassErrorType -> this
|
||||
is ConeErrorType -> this
|
||||
else -> error("Unknown cone type: ${this::class}")
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,9 @@ sealed class ConeKotlinType : ConeKotlinTypeProjection(), KotlinTypeMarker, Type
|
||||
|
||||
sealed class ConeSimpleKotlinType : ConeKotlinType(), SimpleTypeMarker
|
||||
|
||||
typealias ConeKotlinErrorType = ConeClassErrorType
|
||||
|
||||
class ConeClassLikeErrorLookupTag(override val classId: ClassId) : ConeClassLikeLookupTag()
|
||||
|
||||
class ConeClassErrorType(val diagnostic: ConeDiagnostic, val isUninferredParameter: Boolean = false) : ConeClassLikeType() {
|
||||
class ConeErrorType(val diagnostic: ConeDiagnostic, val isUninferredParameter: Boolean = false) : ConeClassLikeType() {
|
||||
override val lookupTag: ConeClassLikeLookupTag
|
||||
get() = ConeClassLikeErrorLookupTag(ClassId.fromString("<error>"))
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.contract
|
||||
|
||||
fun ConeKotlinType.render(): String {
|
||||
val nullabilitySuffix = if (this !is ConeFlexibleType && this !is ConeClassErrorType) nullability.suffix else ""
|
||||
val nullabilitySuffix = if (this !is ConeFlexibleType && this !is ConeErrorType) nullability.suffix else ""
|
||||
return when (this) {
|
||||
is ConeTypeVariableType -> "${renderAttributes()}TypeVariable(${this.lookupTag.name})"
|
||||
is ConeDefinitelyNotNullType -> "${original.render()} & Any"
|
||||
is ConeClassErrorType -> "${renderAttributes()}ERROR CLASS: ${diagnostic.reason}"
|
||||
is ConeErrorType -> "${renderAttributes()}ERROR CLASS: ${diagnostic.reason}"
|
||||
is ConeCapturedType -> "${renderAttributes()}CapturedType(${constructor.projection.render()})"
|
||||
is ConeClassLikeType -> {
|
||||
buildString {
|
||||
|
||||
Reference in New Issue
Block a user