Reference enum instance directly without class in Kotlin

Viewed 2674

In Kotlin, I'm unable to reference the instances of an enum directly when E is in the same file as the code where I use its instances:

enum class E {
    A, B
}

What I want to do:

val e = A    

What I can do:

val e = E.A

Is this possible?

1 Answers
Related