I have an Enum: ```enum class ViewTypes { TODA...
# getting-started
d
I have an Enum:
Copy code
enum class ViewTypes {
    TODAY,
    LAST_7_DAYS,
    LAST_14_DAYS,
    TOTAL,
}
and I would like to loop through it:
Copy code
for (viewType in ViewTypes) {
...
}
but it gives me an error:
Classifier 'ViewTypes' does not have a companion object, and thus must be initialized here
🧵 2
n
IIRC
ViewTypes.values()
works too
👍 1
o
@Daniele B Use thread, please.
d
ok sorry