Python: Fix getArgumentForCall when using keyword arguments

Yikes :|
This commit is contained in:
Rasmus Wriedt Larsen
2020-05-04 20:50:56 +02:00
parent acb506db21
commit e9859ad96d
2 changed files with 2 additions and 2 deletions

View File

@@ -363,7 +363,7 @@ class CallableValue extends Value {
or
exists(string name |
call.getArgByName(name) = result and
this.(PythonFunctionObjectInternal).getScope().getArg(n + offset).getName() = name
this.(PythonFunctionObjectInternal).getScope().getArg(n).getName() = name
)
or
called instanceof BoundMethodObjectInternal and

View File

@@ -19,5 +19,5 @@
| 40 | ControlFlowNode for f() | Function f | 0 | ControlFlowNode for IntegerLiteral |
| 40 | ControlFlowNode for f() | Function f | 1 | ControlFlowNode for IntegerLiteral |
| 40 | ControlFlowNode for f() | Function f | 2 | ControlFlowNode for IntegerLiteral |
| 42 | ControlFlowNode for Attribute() | Function C.n | 0 | ControlFlowNode for IntegerLiteral |
| 42 | ControlFlowNode for Attribute() | Function C.n | 0 | ControlFlowNode for c |
| 42 | ControlFlowNode for Attribute() | Function C.n | 1 | ControlFlowNode for IntegerLiteral |