fixed positive fault of base method signature matching inspection in case of named params and **kwargs (PY-1083)

This commit is contained in:
Dmitry Trofimov
2010-06-18 20:17:11 +04:00
parent 52453b66db
commit ea093f5a02
@@ -115,6 +115,9 @@ public class PyParameterListImpl extends PyBaseElementImpl<PyParameterListStub>
if (nextParameter.isKeywordContainer() || nextParameter.isPositionalContainer()) {
++i;
}
if (nextParameter.isKeywordContainer() && j<anotherParametersLength && anotherParameters[j] instanceof PyNamedParameter) {
j++;
}
}
}
@@ -124,6 +127,9 @@ public class PyParameterListImpl extends PyBaseElementImpl<PyParameterListStub>
if (nextParameter.isKeywordContainer() || nextParameter.isPositionalContainer()) {
++j;
}
if (nextParameter.isKeywordContainer() && i<parametersLength && parameters[i] instanceof PyNamedParameter) {
i++;
}
}
}
return (i >= parametersLength) && (j >= anotherParametersLength);