Files
codeql/csharp/ql/test/library-tests/enums/Enums10.ql
2018-08-02 17:53:23 +01:00

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