Skip to content

Commit 0c9ca45

Browse files
committed
C#: Avoid overlap for () and System.ValueTuple in unification library
1 parent 7af9d75 commit 0c9ca45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

csharp/ql/lib/semmle/code/csharp/Unification.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ module Gvn {
8080
LeafType() {
8181
not this instanceof GenericType and
8282
not this instanceof TypeParameter and
83-
not this instanceof DynamicType
83+
not this instanceof DynamicType and
84+
not this instanceof TupleType
8485
}
8586
}
8687

@@ -478,6 +479,8 @@ module Gvn {
478479
GvnType getGlobalValueNumber(Type t) {
479480
result = TLeafGvnType(t)
480481
or
482+
result = TLeafGvnType(t.(TupleType).getUnderlyingType())
483+
or
481484
t instanceof DynamicType and
482485
result = TLeafGvnType(any(ObjectType ot))
483486
or

0 commit comments

Comments
 (0)