mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
15 lines
381 B
Plaintext
15 lines
381 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
|