mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
17 lines
427 B
Plaintext
17 lines
427 B
Plaintext
/**
|
|
* @name Test for constructor initializers
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from InstanceConstructor c, ConstructorInitializer i
|
|
where
|
|
c.hasName("Nested") and
|
|
i.getEnclosingCallable() = c and
|
|
c.getInitializer() = i and
|
|
c.getNumberOfParameters() = 1 and
|
|
i.getTarget().getDeclaringType() = c.getDeclaringType().getBaseClass() and
|
|
i.getTarget().getNumberOfParameters() = 1 and
|
|
i.getArgument(0) instanceof AddExpr
|
|
select c, i
|