Skip to content

Commit 3ede3af

Browse files
committed
C#: Fix join-order.
1 parent 8c23e21 commit 3ede3af

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,16 +2522,12 @@ predicate compatibleTypes(DataFlowType dt1, DataFlowType dt2) {
25222522
t1.(DataFlowNullType).isConvertibleTo(t2)
25232523
or
25242524
t2.(DataFlowNullType).isConvertibleTo(t1)
2525-
or
2526-
t1 instanceof Gvn::TypeParameterGvnType
2527-
or
2528-
t2 instanceof Gvn::TypeParameterGvnType
2529-
or
2530-
t1 instanceof GvnUnknownType
2531-
or
2532-
t2 instanceof GvnUnknownType
25332525
)
25342526
or
2527+
exists(dt1.asGvnType()) and uselessTypebound(dt2)
2528+
or
2529+
uselessTypebound(dt1) and exists(dt2.asGvnType())
2530+
or
25352531
compatibleTypesDelegateLeft(dt1, dt2)
25362532
or
25372533
compatibleTypesDelegateLeft(dt2, dt1)

0 commit comments

Comments
 (0)