C#: Fix logic for flow into property writes

This commit is contained in:
Tom Hvitved
2023-09-04 15:41:36 +02:00
parent a58c9e91ea
commit 55aedbc46c

View File

@@ -1165,8 +1165,14 @@ private module ArgumentNodes {
) {
e1.(Argument).isArgumentOf(e2, _) and
exactScope = false and
scope = e2 and
isSuccessor = true
isSuccessor = true and
if e2 instanceof PropertyWrite
then
exists(AssignableDefinition def |
def.getTargetAccess() = e2 and
scope = def.getExpr()
)
else scope = e2
}
}