FIR: Use NullableAny as a default bound

This commit is contained in:
Denis.Zharkov
2022-04-11 18:31:08 +03:00
committed by teamcity
parent 934b8c890e
commit 853b7ec078
2 changed files with 4 additions and 3 deletions
@@ -176,7 +176,7 @@ object FirJavaGenericVarianceViolationTypeChecker : FirFunctionCallChecker() {
return when (this) {
is ConeKotlinTypeProjectionOut -> if (isCovariant) type else this
is ConeKotlinTypeProjectionIn -> ConeKotlinTypeProjectionIn(type.removeOutProjection(!isCovariant))
is ConeStarProjection -> if (isCovariant) StandardTypes.Any else this
is ConeStarProjection -> if (isCovariant) StandardTypes.NullableAny else this
// Don't remove nested projections for types at invariant position.
is ConeKotlinTypeConflictingProjection,
is ConeKotlinType -> this