mirror of
https://github.com/github/codeql.git
synced 2026-03-22 07:26:45 +01:00
14 lines
392 B
Plaintext
14 lines
392 B
Plaintext
/**
|
|
* @name Test for anonymous methods
|
|
*/
|
|
import csharp
|
|
|
|
from Assignment assign, AnonymousMethodExpr e, Parameter p, ParameterAccess pa
|
|
where assign.getLValue().(VariableAccess).getTarget().hasName("f7")
|
|
and e.getParent+() = assign
|
|
and e.getNumberOfParameters() = 1
|
|
and p = e.getParameter(0)
|
|
and pa.getEnclosingStmt().getParent+() = e.getBody()
|
|
and pa.getTarget() = p
|
|
select e, p
|