mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-4027 Call to constructor of super class is missed: false negative for wrong super call
This commit is contained in:
@@ -104,9 +104,15 @@ public class PyMissingConstructorInspection extends PyInspection {
|
||||
if (ref != null)
|
||||
callingClass = ref.resolve();
|
||||
}
|
||||
if (PyNames.SUPER.equals(tmp) && (PyNames.INIT.equals(callee.getName()))) {
|
||||
PyExpression[] args = ((PyCallExpression)qualifier).getArguments();
|
||||
if (args.length > 0) {
|
||||
if (args[0].getText().equals(cl.getName()))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
tmp = qualifier.getText();
|
||||
PsiReference ref = qualifier.getReference();
|
||||
if (ref != null)
|
||||
callingClass = ref.resolve();
|
||||
@@ -118,8 +124,6 @@ public class PyMissingConstructorInspection extends PyInspection {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PyNames.SUPER.equals(tmp) && (PyNames.INIT.equals(callee.getName())))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user