Fix the case of safe call and elvis operators: flexible types may be nullable
This commit is contained in:
@@ -423,6 +423,9 @@ public class TypeUtils {
|
||||
if (type.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {
|
||||
return hasNullableSuperType(type);
|
||||
}
|
||||
if (TypesPackage.isFlexible(type) && isNullableType(((FlexibleType) type).getUpperBound())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user