Files
codeql/csharp/ql/test/library-tests/expressions/AnonymousMethod1.ql
2018-12-20 10:19:59 +01:00

15 lines
341 B
Plaintext

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