mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
17 lines
399 B
Plaintext
17 lines
399 B
Plaintext
/**
|
|
* @name Test for constructor initializers
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from InstanceConstructor c, ConstructorInitializer i
|
|
where
|
|
c.hasName("Class") and
|
|
i.getEnclosingCallable() = c and
|
|
c.getInitializer() = i and
|
|
c.hasNoParameters() and
|
|
i.getTarget().getDeclaringType() = c.getDeclaringType() and
|
|
i.getTarget().getNumberOfParameters() = 1 and
|
|
i.getArgument(0).getValue() = "0"
|
|
select c, i
|