File tree Expand file tree Collapse file tree
csharp/ql/test/library-tests/cil/consistency Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,10 +17,18 @@ query predicate tooManyHandles(string s) {
1717 )
1818}
1919
20+ private class UniqueMetadataEntity extends MetadataEntity {
21+ UniqueMetadataEntity ( ) {
22+ // Tuple types such as `(,)` and `ValueTuple`2` share the same handle
23+ not this instanceof TupleType and
24+ not this .getQualifiedName ( ) .matches ( "System.ValueTuple%" )
25+ }
26+ }
27+
2028query predicate tooManyMatchingHandles ( string s ) {
21- exists ( MetadataEntity e , Assembly a , int handle |
29+ exists ( UniqueMetadataEntity e , Assembly a , int handle |
2230 metadata_handle ( e , a , handle ) and
23- strictcount ( MetadataEntity e2 | metadata_handle ( e2 , a , handle ) ) > 2 and
31+ strictcount ( UniqueMetadataEntity e2 | metadata_handle ( e2 , a , handle ) ) > 2 and
2432 s = e .getQualifiedName ( )
2533 )
2634}
You can’t perform that action at this time.
0 commit comments