Python: Fix default parameter value flow

Somehow the previous fix didn't work :O
This commit is contained in:
Rasmus Wriedt Larsen
2023-07-07 16:05:27 +02:00
parent 43b025015d
commit 44c67171f2
2 changed files with 4 additions and 4 deletions

View File

@@ -467,8 +467,10 @@ predicate runtimeJumpStep(Node nodeFrom, Node nodeTo) {
// a parameter with a default value, since the parameter will be in the scope of the
// function, while the default value itself will be in the scope that _defines_ the
// function.
nodeFrom.(CfgNode).getNode() =
nodeTo.(EssaNode).getVar().getDefinition().(ParameterDefinition).getDefault()
exists(ParameterDefinition param |
nodeFrom.asCfgNode() = param.getDefault() and
nodeTo.asCfgNode() = param.getDefiningNode()
)
}
/**