From eb0b14f04f34339062edccdb0c28847222358ef4 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Mon, 3 Mar 2014 15:00:48 +0400 Subject: [PATCH] Changed Callable.getCallType() with explicit 'null' call site to Callable.getReturnType() --- .../python/codeInsight/override/PyOverrideImplementUtil.java | 2 +- .../com/jetbrains/python/psi/impl/PyCallExpressionHelper.java | 2 +- python/src/com/jetbrains/python/psi/impl/PyClassImpl.java | 2 +- .../src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/src/com/jetbrains/python/codeInsight/override/PyOverrideImplementUtil.java b/python/src/com/jetbrains/python/codeInsight/override/PyOverrideImplementUtil.java index a7fc0dc08d25..cce526ad60ec 100644 --- a/python/src/com/jetbrains/python/codeInsight/override/PyOverrideImplementUtil.java +++ b/python/src/com/jetbrains/python/codeInsight/override/PyOverrideImplementUtil.java @@ -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()) { diff --git a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java index 874190b84104..4928bc6305e6 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java +++ b/python/src/com/jetbrains/python/psi/impl/PyCallExpressionHelper.java @@ -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(); } diff --git a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java index b25ba2dbfa86..cc112040964d 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java @@ -750,7 +750,7 @@ public class PyClassImpl extends PyPresentableElementImpl implement if (!(callable instanceof StubBasedPsiElement) && !context.maySwitchToAST(callable)) { return null; } - return callable.getCallType(context, null); + return callable.getReturnType(context); } return null; } diff --git a/python/src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java b/python/src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java index eeb3f9a0e3af..04771779a780 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyNamedParameterImpl.java @@ -208,7 +208,7 @@ public class PyNamedParameterImpl extends PyPresentableElementImpl