Check if returned typeParameters are null
- See EA-141456, EA-212070
This commit is contained in:
committed by
Roman Golyshev
parent
4171dd511f
commit
85bfbaa8a8
+6
-1
@@ -287,7 +287,12 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorNonRoo
|
||||
@Override
|
||||
@NotNull
|
||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
||||
return typeParameters;
|
||||
List<TypeParameterDescriptor> parameters = typeParameters;
|
||||
// Diagnostics for EA-141456
|
||||
if (parameters == null) {
|
||||
throw new IllegalStateException("typeParameters == null for " + this);
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-1
@@ -152,7 +152,12 @@ public class PropertyDescriptorImpl extends VariableDescriptorWithInitializerImp
|
||||
@NotNull
|
||||
@Override
|
||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
||||
return typeParameters;
|
||||
List<TypeParameterDescriptor> parameters = typeParameters;
|
||||
// Diagnostics for EA-212070
|
||||
if (parameters == null) {
|
||||
throw new IllegalStateException("typeParameters == null for " + this.toString());
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user