Skip to content

Commit 6e90823

Browse files
authored
Merge pull request #20158 from hvitved/csharp/has-callable-constructor
C#: Include constructors in `ValueOrRefType.hasCallable`
2 parents b426d84 + 361ef0f commit 6e90823

File tree

1 file changed

+1
-1
lines changed
  • csharp/ql/lib/semmle/code/csharp

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class ValueOrRefType extends Type, Attributable, @value_or_ref_type {
201201
*/
202202
pragma[inline]
203203
predicate hasCallable(Callable c) {
204-
this.hasMethod(c)
204+
this.hasMember(c)
205205
or
206206
this.hasMember(c.(Accessor).getDeclaration())
207207
}

0 commit comments

Comments
 (0)