File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp/commons Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import csharp
44import semmle.code.csharp.frameworks.system.Collections
5- import semmle.code.csharp.frameworks.system.collections.Generic
65
76private string modifyMethodName ( ) {
87 result =
@@ -70,11 +69,8 @@ class CollectionType extends RefType {
7069
7170/** Holds if `t` is a collection type. */
7271predicate 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
7874}
7975
8076/** An object creation that creates an empty collection. */
You can’t perform that action at this time.
0 commit comments