mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
14 lines
379 B
Plaintext
14 lines
379 B
Plaintext
/**
|
|
* @name Test for indexer access
|
|
*/
|
|
import csharp
|
|
|
|
from Method m, IndexerAccess e
|
|
where m.hasName("MainAccesses")
|
|
and e.getEnclosingCallable() = m
|
|
and e.getQualifier().(ParameterAccess).getTarget().hasName("other")
|
|
and e.getIndex(0).(LocalVariableAccess).getTarget().hasName("i")
|
|
and e.getIndex(1).(MemberConstantAccess).getTarget().hasName("constant")
|
|
select m, e
|
|
|