diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index 3f2ffbd8c9d..95fed08f931 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -2075,11 +2075,10 @@ predicate storeStep(Node node1, ContentSet c, Node node2) { node1 = TExplicitParameterNode(p) and node2 = TPrimaryConstructorThisAccessNode(p, true) and 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() + if t instanceof RecordType then + c.(PropertyContent).getProperty().getName() = p.getName() + else + c.(PrimaryConstructorParameterContent).getParameter() = p ) ) or