Skip to content

Commit fc717db

Browse files
committed
C#: Cater for the dynamic member access call special case.
1 parent 8b5038f commit fc717db

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,19 @@ private module ArgumentNodes {
15791579
scope = def.getExpr()
15801580
)
15811581
else scope = e2
1582+
or
1583+
e1.(Argument).isArgumentOf(e2, _) and
1584+
(
1585+
e2 instanceof DynamicMemberAccess or
1586+
e2 instanceof DynamicElementAccess
1587+
) and
1588+
exists(AssignableDefinitions::AssignOperationDefinition def |
1589+
def.getTargetAccess() = e2 and
1590+
def.getExpr() = e1
1591+
) and
1592+
exactScope = false and
1593+
isSuccessor = false and
1594+
scope = e1
15821595
}
15831596
}
15841597

0 commit comments

Comments
 (0)