Resolve implicit __call__ call on typed elements (PY-33500)

So receiver for implicit `__call__` calls could be determined and hence generics substitutions would be inferred.

GitOrigin-RevId: 51049a8c8ccae6b6620941952b7f1eba53932799
This commit is contained in:
Semyon Proshev
2019-10-09 17:31:55 +03:00
committed by intellij-monorepo-bot
parent 24a4ff6b78
commit 6db6ad9f51
3 changed files with 38 additions and 16 deletions

View File

@@ -51,6 +51,10 @@ public interface PyCallExpression extends PyCallSiteExpression {
return null;
}
if (resolvedCallee != null && PyNames.CALL.equals(resolvedCallee.getName()) && !PyNames.CALL.equals(qualifiedCallee.getName())) {
return qualifiedCallee;
}
return qualifiedCallee.getQualifier();
}