The code
enum class Alphabet{
A{
var str: String = "Dzien dobry"
},
B,C,D
}
The usage
println(Alphabet.A.str) //this one fails to compile as property "str" is unknown
println((Alphabet.A as Alphabet.A).str) //awkward cast makes it work
It's not that it crashes or something but still kinda strange when one reads such code