File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
csharp/ql/lib/semmle/code/csharp/commons Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import csharp
4
4
import semmle.code.csharp.frameworks.system.Collections
5
- import semmle.code.csharp.frameworks.system.collections.Generic
6
5
7
6
private string modifyMethodName ( ) {
8
7
result =
@@ -70,11 +69,8 @@ class CollectionType extends RefType {
70
69
71
70
/** Holds if `t` is a collection type. */
72
71
predicate isCollectionType ( ValueOrRefType t ) {
73
- not t instanceof StringType and
74
- exists ( ValueOrRefType base | base = t .getABaseType * ( ) |
75
- base instanceof SystemCollectionsGenericIEnumerableTInterface or
76
- base instanceof SystemCollectionsIEnumerableInterface
77
- )
72
+ t .getABaseType * ( ) instanceof SystemCollectionsIEnumerableInterface and
73
+ not t instanceof StringType
78
74
}
79
75
80
76
/** An object creation that creates an empty collection. */
You can’t perform that action at this time.
0 commit comments