do not change parameter types in MethodSignature

This commit is contained in:
anna
2013-11-25 20:48:23 +01:00
parent 243927e873
commit cbe65f9df0
@@ -439,9 +439,12 @@ public class PsiMethodReferenceExpressionImpl extends PsiReferenceExpressionBase
}
} else {
if (rightTypes.length != types.length || rightTypes[rightTypes.length - 1].getArrayDimensions() != types[types.length-1].getArrayDimensions()) {
types[types.length - 1] = ((PsiArrayType)types[types.length - 1]).getComponentType();
boolean expandTypeArray = types.length < rightTypes.length;
int min = Math.min(types.length, rightTypes.length);
types = Arrays.copyOf(types, min);
if (expandTypeArray) {
types[types.length - 1] = ((PsiArrayType)types[types.length - 1]).getComponentType();
}
rightTypes = Arrays.copyOf(rightTypes, min);
}
}