mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
21 lines
511 B
Plaintext
21 lines
511 B
Plaintext
/**
|
|
* @name Test for enums
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from EnumConstant c, EnumConstant d
|
|
where
|
|
c.getName() = "Blue" and
|
|
d.hasName("AnotherBlue") and
|
|
c.getDeclaringType().hasQualifiedName("Enums.SparseColor") and
|
|
c.getType() = c.getDeclaringType() and
|
|
c.getType() = d.getType() and
|
|
c.getValue() = "11" and
|
|
c.getValue() = d.getValue() and
|
|
c.getUnderlyingType() instanceof IntType and
|
|
c.getUnderlyingType() = d.getUnderlyingType() and
|
|
not c.hasExplicitValue() and
|
|
d.hasExplicitValue()
|
|
select c, d
|