[FIR] Add CANNOT_CHECK_FOR_ERASED

This commit is contained in:
Ivan Kochurkin
2021-09-15 20:44:47 +03:00
committed by TeamCityServer
parent e52a410599
commit 291bc74676
44 changed files with 514 additions and 134 deletions
@@ -65,6 +65,15 @@ fun ConeKotlinType.toTypeProjection(variance: Variance): ConeTypeProjection =
Variance.OUT_VARIANCE -> ConeKotlinTypeProjectionOut(this)
}
fun ConeKotlinType.toTypeProjection(projectionKind: ProjectionKind): ConeTypeProjection {
return when (projectionKind) {
ProjectionKind.INVARIANT -> this
ProjectionKind.IN -> ConeKotlinTypeProjectionIn(this)
ProjectionKind.OUT -> ConeKotlinTypeProjectionOut(this)
ProjectionKind.STAR -> ConeStarProjection
}
}
fun ConeClassLikeType.replaceArgumentsWithStarProjections(): ConeClassLikeType {
if (typeArguments.isEmpty()) return this
val newArguments = Array(typeArguments.size) { ConeStarProjection }