Compute nullability for stub types properly
This commit is contained in:
@@ -303,6 +303,11 @@ public class TypeUtils {
|
||||
if (isTypeParameter(type)) {
|
||||
return hasNullableSuperType(type);
|
||||
}
|
||||
if (type instanceof AbstractStubType) {
|
||||
NewTypeVariableConstructor typeVariableConstructor = (NewTypeVariableConstructor) ((AbstractStubType) type).getOriginalTypeVariable();
|
||||
TypeParameterDescriptor typeParameter = typeVariableConstructor.getOriginalTypeParameter();
|
||||
return typeParameter == null || hasNullableSuperType(typeParameter.getDefaultType());
|
||||
}
|
||||
|
||||
TypeConstructor constructor = type.getConstructor();
|
||||
if (constructor instanceof IntersectionTypeConstructor) {
|
||||
|
||||
Reference in New Issue
Block a user