Skip to content

Commit 3926436

Browse files
committed
JS: Explain use of t.call()
1 parent d6578e1 commit 3926436

File tree

1 file changed

+3
-0
lines changed
  • javascript/ql/src/semmle/javascript/dataflow

1 file changed

+3
-0
lines changed

javascript/ql/src/semmle/javascript/dataflow/Nodes.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,9 @@ class ClassNode extends DataFlow::SourceNode {
710710
t.start() and
711711
result = getAReceiverNode()
712712
or
713+
// Use a parameter type as starting point of type tracking.
714+
// Use `t.call()` to emulate the value being passed in through an unseen
715+
// call site, but not out of the call again.
713716
t.call() and
714717
exists(Parameter param |
715718
this = param.getTypeAnnotation().getClass() and

0 commit comments

Comments
 (0)