Changed Callable.getCallType() with explicit 'null' call site to Callable.getReturnType()

This commit is contained in:
Andrey Vlasovskikh
2014-03-03 15:00:48 +04:00
parent dd898e2d02
commit eb0b14f04f
4 changed files with 4 additions and 4 deletions
@@ -225,7 +225,7 @@ public class PyOverrideImplementUtil {
statementBody.append(PyNames.PASS);
}
else {
if (!PyNames.INIT.equals(baseFunction.getName()) && baseFunction.getCallType(context, null) != PyNoneType.INSTANCE) {
if (!PyNames.INIT.equals(baseFunction.getName()) && baseFunction.getReturnType(context) != PyNoneType.INSTANCE) {
statementBody.append("return ");
}
if (baseClass.isNewStyleClass()) {
@@ -198,7 +198,7 @@ public class PyCallExpressionHelper {
final PyFunction function = (PyFunction)resolved;
final Property property = function.getProperty();
if (property != null && isQualifiedByInstance(function, qualifiers, context)) {
final PyType type = function.getCallType(context, null);
final PyType type = function.getReturnType(context);
if (type instanceof PyFunctionType) {
resolved = ((PyFunctionType)type).getCallable();
}
@@ -750,7 +750,7 @@ public class PyClassImpl extends PyPresentableElementImpl<PyClassStub> implement
if (!(callable instanceof StubBasedPsiElement) && !context.maySwitchToAST(callable)) {
return null;
}
return callable.getCallType(context, null);
return callable.getReturnType(context);
}
return null;
}
@@ -208,7 +208,7 @@ public class PyNamedParameterImpl extends PyPresentableElementImpl<PyNamedParame
PyType initType = null;
final PyFunction init = containingClass.findInitOrNew(true);
if (init != null && init != func) {
initType = init.getCallType(context, null);
initType = init.getReturnType(context);
if (init.getContainingClass() != containingClass) {
if (initType instanceof PyCollectionType) {
final PyType elementType = ((PyCollectionType)initType).getElementType(context);