Files
codeql/csharp/ql/test/library-tests/expressions/Lambda3.ql
2018-08-02 17:53:23 +01:00

14 lines
377 B
Plaintext

/**
* @name Test for lambda expressions
*/
import csharp
from Assignment assign, LambdaExpr e
where assign.getLValue().(VariableAccess).getTarget().hasName("f3")
and e.getParent+() = assign
and e.getNumberOfParameters() = 1
and e.getParameter(0).getType() instanceof IntType
and e.getParameter(0).hasName("x")
and e.getExpressionBody() instanceof AddExpr
select e