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
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
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
|
@Override
|
||||||
|
|||||||
+6
-1
@@ -152,7 +152,12 @@ public class PropertyDescriptorImpl extends VariableDescriptorWithInitializerImp
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user