mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correctly track argument count for inherited __init__ calls (PY-312)
This commit is contained in:
@@ -114,7 +114,14 @@ public class PyCallExpressionHelper {
|
||||
}
|
||||
// decorators?
|
||||
PyFunction method = (PyFunction)resolved; // constructor call?
|
||||
if (PyNames.INIT.equals(method.getName())) implicit_offset += 1;
|
||||
if (PyNames.INIT.equals(method.getName())) {
|
||||
String refName = us.getCallee() instanceof PyReferenceExpression
|
||||
? ((PyReferenceExpression) us.getCallee()).getReferencedName()
|
||||
: null;
|
||||
if (!PyNames.INIT.equals(refName)) { // PY-312
|
||||
implicit_offset += 1;
|
||||
}
|
||||
}
|
||||
// look for closest decorator
|
||||
PyDecoratorList decolist = method.getDecoratorList();
|
||||
if (decolist != null) {
|
||||
|
||||
Reference in New Issue
Block a user