I understand that enums are generally reduced to ints under Java but why can’t I at least do:
let enumNames = [ String(Enum.Blue), String(Enum.Green), String(Enum.Red) ]
return enumNames[Int(enum)]
(gives “no matching overload”)
?
Is there really no way at compile time of stringify a given enum value, even if it’s a fixed value?