diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypeUtils.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypeUtils.kt index 485e82f3648..88a1b4a5a45 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypeUtils.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/ConeTypeUtils.kt @@ -131,8 +131,4 @@ fun ConeKotlinType.renderReadableWithFqNames(): String { return builder.toString() } -fun ConeKotlinType.hasError(): Boolean = when (this) { - is ConeErrorType -> true - is ConeFlexibleType -> lowerBound.hasError() || upperBound.hasError() - else -> typeArguments.any { it is ConeKotlinType && it.hasError() } -} +fun ConeKotlinType.hasError(): Boolean = contains { it is ConeErrorType }