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

15 lines
338 B
Plaintext

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