mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
20 lines
509 B
Plaintext
20 lines
509 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
|