mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
assert valid substitutor (EA-40074)
This commit is contained in:
@@ -77,6 +77,8 @@ public class MethodSignatureBackedByPsiMethod extends MethodSignatureBase {
|
||||
substitutor = JavaPsiFacade.getInstance(method.getProject()).getElementFactory().createRawSubstitutor(substitutor, methodTypeParameters);
|
||||
methodTypeParameters = PsiTypeParameter.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
assert substitutor.isValid();
|
||||
|
||||
final PsiParameter[] parameters = method.getParameterList().getParameters();
|
||||
PsiType[] parameterTypes = new PsiType[parameters.length];
|
||||
|
||||
@@ -29,10 +29,11 @@ public abstract class MethodSignatureBase implements MethodSignature {
|
||||
|
||||
protected MethodSignatureBase(@NotNull PsiSubstitutor substitutor, @NotNull PsiType[] parameterTypes, @NotNull PsiTypeParameter[] typeParameters) {
|
||||
mySubstitutor = substitutor;
|
||||
assert substitutor.isValid();
|
||||
myParameterTypes = parameterTypes.length == 0 ? PsiType.EMPTY_ARRAY : new PsiType[parameterTypes.length];
|
||||
for (int i = 0; i < parameterTypes.length; i++) {
|
||||
PsiType type = parameterTypes[i];
|
||||
assert type.isValid();
|
||||
assert type == null || type.isValid();
|
||||
if (type instanceof PsiEllipsisType) type = ((PsiEllipsisType) type).toArrayType();
|
||||
myParameterTypes[i] = substitutor.substitute(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user