[NI] Fix isNullableType for definitely not null type parameter

Consider type parameter with nullable bound not null
if it is inside of a definitely not null type.
This commit is contained in:
Pavel Kirpichenkov
2020-03-10 18:23:51 +03:00
parent 88ae9bc7d5
commit 04f9a03796
7 changed files with 56 additions and 0 deletions
@@ -295,6 +295,9 @@ public class TypeUtils {
if (FlexibleTypesKt.isFlexible(type) && isNullableType(FlexibleTypesKt.asFlexibleType(type).getUpperBound())) {
return true;
}
if (SpecialTypesKt.isDefinitelyNotNullType(type)) {
return false;
}
if (isTypeParameter(type)) {
return hasNullableSuperType(type);
}