Skip to content

Commit 8bd4f6d

Browse files
authored
Merge pull request github#2945 from BekaValentine/python-objectapi-to-valueapi-calltosuperwrongclass
Python: ObjectAPI to ValueAPI: CallToSuperWrongClass
2 parents 9068040 + d5f689e commit 8bd4f6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ql/src/Expressions/CallToSuperWrongClass.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ import python
1717
from CallNode call_to_super, string name
1818
where
1919
exists(GlobalVariable gv, ControlFlowNode cn |
20-
call_to_super = theSuperType().getACall() and
20+
call_to_super = ClassValue::super_().getACall() and
2121
gv.getId() = "super" and
2222
cn = call_to_super.getArg(0) and
2323
name = call_to_super.getScope().getScope().(Class).getName() and
24-
exists(ClassObject other |
25-
cn.refersTo(other) and
26-
not other.getPyClass().getName() = name
24+
exists(ClassValue other |
25+
cn.pointsTo(other) and
26+
not other.getScope().getName() = name
2727
)
2828
)
2929
select call_to_super.getNode(), "First argument to super() should be " + name + "."

0 commit comments

Comments
 (0)