Skip to content

Commit 0b1705f

Browse files
committed
C#: Adjust Callable::canReturn to handle Task-like async return types
1 parent cd82091 commit 0b1705f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

csharp/ql/src/semmle/code/csharp/Callable.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ private import dotnet
1111
private import semmle.code.csharp.ExprOrStmtParent
1212
private import semmle.code.csharp.metrics.Complexity
1313
private import TypeRef
14-
private import semmle.code.csharp.frameworks.system.threading.Tasks
1514

1615
/**
1716
* An element that can be called.
@@ -210,7 +209,7 @@ class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @cal
210209
not this.getReturnType() instanceof VoidType and
211210
(
212211
not this.(Modifiable).isAsync() or
213-
not this.getReturnType() instanceof SystemThreadingTasksTaskClass
212+
this.getReturnType() instanceof Generic
214213
)
215214
}
216215

0 commit comments

Comments
 (0)