From 361ef0f50dece2152f8981b93f8b31c8c361c0d7 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 4 Aug 2025 09:14:43 +0200 Subject: [PATCH] C#: Include constructors in `ValueOrRefType.hasCallable` --- csharp/ql/lib/semmle/code/csharp/Type.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/ql/lib/semmle/code/csharp/Type.qll b/csharp/ql/lib/semmle/code/csharp/Type.qll index d11b5618e806..e417f393b94a 100644 --- a/csharp/ql/lib/semmle/code/csharp/Type.qll +++ b/csharp/ql/lib/semmle/code/csharp/Type.qll @@ -201,7 +201,7 @@ class ValueOrRefType extends Type, Attributable, @value_or_ref_type { */ pragma[inline] predicate hasCallable(Callable c) { - this.hasMethod(c) + this.hasMember(c) or this.hasMember(c.(Accessor).getDeclaration()) }