mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
C#: Make a store step from explicit parameter nodes on primary constructors to the property of the same name for record types.
This commit is contained in:
@@ -2074,7 +2074,13 @@ predicate storeStep(Node node1, ContentSet c, Node node2) {
|
||||
exists(Parameter p |
|
||||
node1 = TExplicitParameterNode(p) and
|
||||
node2 = TPrimaryConstructorThisAccessNode(p, true) and
|
||||
c.(PrimaryConstructorParameterContent).getParameter() = p
|
||||
exists(Type t | t = p.getCallable().getDeclaringType() |
|
||||
not t instanceof RecordType and
|
||||
c.(PrimaryConstructorParameterContent).getParameter() = p
|
||||
or
|
||||
t instanceof RecordType and
|
||||
c.(PropertyContent).getProperty().getName() = p.getName()
|
||||
)
|
||||
)
|
||||
or
|
||||
FlowSummaryImpl::Private::Steps::summaryStoreStep(node1.(FlowSummaryNode).getSummaryNode(), c,
|
||||
|
||||
Reference in New Issue
Block a user