C#: Adjust Callable::canReturn to handle Task-like async return types

This commit is contained in:
Tamas Vajk
2021-03-17 09:25:57 +01:00
parent cd820917bc
commit 0b1705f302

View File

@@ -11,7 +11,6 @@ private import dotnet
private import semmle.code.csharp.ExprOrStmtParent
private import semmle.code.csharp.metrics.Complexity
private import TypeRef
private import semmle.code.csharp.frameworks.system.threading.Tasks
/**
* An element that can be called.
@@ -210,7 +209,7 @@ class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @cal
not this.getReturnType() instanceof VoidType and
(
not this.(Modifiable).isAsync() or
not this.getReturnType() instanceof SystemThreadingTasksTaskClass
this.getReturnType() instanceof Generic
)
}