fix AIOOBE

This commit is contained in:
Maxim.Medvedev
2012-08-04 23:03:13 +04:00
parent 0dcf0c42da
commit 67f44bfbeb
@@ -261,18 +261,19 @@ public class GroovyParameterInfoHandler implements ParameterInfoHandlerWithTabAc
}
assert argTypes != null;
if (parameterTypes.length <= currIndex) {
context.setUIComponentEnabled(i, false);
continue;
}
else {
for (int j = 0; j < currIndex; j++) {
PsiType argType = argTypes[j];
final PsiType paramType = substitutor != null ? substitutor.substitute(parameterTypes[j]) : parameterTypes[j];
if (!TypesUtil.isAssignable(paramType, argType, place)) {
context.setUIComponentEnabled(i, false);
break Outer;
if (argTypes.length > currIndex) {
if (parameterTypes.length <= currIndex) {
context.setUIComponentEnabled(i, false);
continue;
}
else {
for (int j = 0; j < currIndex; j++) {
PsiType argType = argTypes[j];
final PsiType paramType = substitutor != null ? substitutor.substitute(parameterTypes[j]) : parameterTypes[j];
if (!TypesUtil.isAssignable(paramType, argType, place)) {
context.setUIComponentEnabled(i, false);
break Outer;
}
}
}
}