mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Kotlin: Add test case for missing enum constants
This commit is contained in:
@@ -1 +1,3 @@
|
||||
fun usesEnum(e: Enum<*>) = e.ordinal.toString() + e.name
|
||||
|
||||
enum class E { A, B, C }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
enumConstants
|
||||
#select
|
||||
| addAll |
|
||||
| addRange |
|
||||
| allOf |
|
||||
|
||||
@@ -3,3 +3,5 @@ import java
|
||||
from Method m
|
||||
where m.getDeclaringType().getName().matches("Enum%")
|
||||
select m.getName()
|
||||
|
||||
query predicate enumConstants(EnumConstant ec) { ec.fromSource() }
|
||||
|
||||
Reference in New Issue
Block a user