Use cache in TypeEvalContext when choosing left/right binary operator (PY-8731)

This commit is contained in:
Andrey Vlasovskikh
2013-02-05 21:01:11 +04:00
parent b22d76f891
commit 165a805e0f
@@ -352,7 +352,7 @@ public class PyTypeChecker {
final PsiElement resolved = result.getElement();
if (resolved instanceof PyTypedElement) {
final PyTypedElement typedElement = (PyTypedElement)resolved;
final PyType type = typedElement.getType(context);
final PyType type = context.getType(typedElement);
if (!(type instanceof PyFunctionType)) {
return null;
}
@@ -370,7 +370,7 @@ public class PyTypeChecker {
if (firstResults == null) {
firstResults = results;
}
if (match(param.getType(context), arg.getType(context), context)) {
if (match(context.getType(param), context.getType(arg), context)) {
return results;
}
}