[FIR] Rewrite ConeKotlinType.hasError() using ConeKotlinType.contains()

This commit is contained in:
Kirill Rakhman
2023-04-11 16:50:06 +02:00
committed by Space Team
parent 1f29490118
commit 030866cb0b
@@ -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 }