Python: allow CaptureArgumentNodes as multiple arguemnts

These are the labmda self references. This is similar to
how `BlockParameterArgumentNode` is excluded for Ruby.

It is important that we restrict `call` in this logic.
Otherwise, we get a cartesian product and the consistency
check runs for a very long time...
This commit is contained in:
Rasmus Lerchedahl Petersen
2023-12-06 21:42:45 +01:00
parent f32d5e422d
commit 38e03216f6

View File

@@ -140,6 +140,9 @@ private module Input implements InputSig<PythonDataFlow> {
arg = other.getArgument(any(ArgumentPosition p | p.isSelf())) and
other.getNode().getScope() = f
)
or
arg = call.getArgument(_) and
arg instanceof CaptureArgumentNode
}
}