mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Return instance types for instance types of superclasses
This commit is contained in:
@@ -228,7 +228,7 @@ public class PyFunctionImpl extends PyPresentableElementImpl<PyFunctionStub> imp
|
||||
if (returnClassType.getPyClass() == getContainingClass()) {
|
||||
final PyType receiverType = context.getType(receiver);
|
||||
if (receiverType instanceof PyClassType && PyTypeChecker.match(returnType, receiverType, context)) {
|
||||
return receiverType;
|
||||
return returnClassType.isDefinition() ? receiverType : ((PyClassType)receiverType).toInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user