Files
codeql/csharp/ql/test/library-tests/expressions/AnonymousMethod3.ql
2026-04-01 12:50:37 +02:00

14 lines
324 B
Plaintext

/**
* @name Test for anonymous methods
*/
import csharp
from Assignment assign, AnonymousMethodExpr e
where
assign.getLeftOperand().(VariableAccess).getTarget().hasName("f7") and
e.getParent+() = assign and
e.getNumberOfParameters() = 1 and
e.getType().(DelegateType).getReturnType() instanceof IntType
select e