Skip to content

Commit 090ea01

Browse files
committed
C#: Fix bad join-order in System.Tuple flow-summaries
1 parent 8f6dbe9 commit 090ea01

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,9 +1663,14 @@ class SystemTupleFlow extends LibraryTypeDataFlow, ValueOrRefType {
16631663
}
16641664

16651665
private AccessPath getItemAccessPath(int i) {
1666-
i in [1 .. count(this.getAMember())] and
1667-
result in [AccessPath::field(this.getField("Item" + i)),
1668-
AccessPath::property(this.getProperty("Item" + i))]
1666+
result =
1667+
unique(AccessPath ap |
1668+
i in [1 .. count(this.getAMember())] and
1669+
ap in [AccessPath::field(this.getField("Item" + i)),
1670+
AccessPath::property(this.getProperty("Item" + i))]
1671+
|
1672+
ap
1673+
)
16691674
}
16701675

16711676
override predicate callableFlow(

0 commit comments

Comments
 (0)