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

15 lines
304 B
Plaintext

/**
* @name Test for usings
*/
import csharp
from Method m, LocalVariable v
where
m.hasName("MainUsing") and
v.getVariableDeclExpr().getEnclosingCallable() = m and
v.getVariableDeclExpr().getParent() instanceof UsingStmt and
v.hasName("w") and
v.getType().hasName("TextWriter")
select m, v