We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9068040 + d5f689e commit 8bd4f6dCopy full SHA for 8bd4f6d
python/ql/src/Expressions/CallToSuperWrongClass.ql
@@ -17,13 +17,13 @@ import python
17
from CallNode call_to_super, string name
18
where
19
exists(GlobalVariable gv, ControlFlowNode cn |
20
- call_to_super = theSuperType().getACall() and
+ call_to_super = ClassValue::super_().getACall() and
21
gv.getId() = "super" and
22
cn = call_to_super.getArg(0) and
23
name = call_to_super.getScope().getScope().(Class).getName() and
24
- exists(ClassObject other |
25
- cn.refersTo(other) and
26
- not other.getPyClass().getName() = name
+ exists(ClassValue other |
+ cn.pointsTo(other) and
+ not other.getScope().getName() = name
27
)
28
29
select call_to_super.getNode(), "First argument to super() should be " + name + "."
0 commit comments