mirror of
https://github.com/github/codeql.git
synced 2026-04-10 17:44:03 +02:00
Do not pass regular positional args into the rest parameter
This commit is contained in:
@@ -287,7 +287,11 @@ abstract class LibraryCallable extends string {
|
||||
}
|
||||
|
||||
private predicate isParameterNodeImpl(Node p, DataFlowCallable c, ParameterPosition pos) {
|
||||
p = c.asSourceCallable().(Function).getParameter(pos.asPositional()).flow()
|
||||
exists(Parameter parameter |
|
||||
parameter = c.asSourceCallable().(Function).getParameter(pos.asPositional()) and
|
||||
not parameter.isRestParameter() and
|
||||
p = TValueNode(parameter)
|
||||
)
|
||||
or
|
||||
pos.isThis() and p = TThisNode(c.asSourceCallable().(Function))
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user