[FIR] Make type parameters inaccessible for non-inner nested types

#KT-57209
This commit is contained in:
Kirill Rakhman
2023-03-14 17:20:35 +01:00
committed by Space Team
parent c39ab956a0
commit 1f0d56e157
24 changed files with 227 additions and 181 deletions
@@ -131,3 +131,8 @@ 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() }
}