mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Changed Callable.getCallType() with explicit 'null' call site to Callable.getReturnType()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user