enum TowValues
Aa
AA
end
def foo(v : TowValues)
puts v
end
foo :AA # => Aa
I’m pretty sure this is more so a limitation of enums in general themselves than symbol autocasting. E.g.
enum TowValues
Aa
AA
end
TowValues.parse "AA" # => TowValues::Aa
Mainly due to these features trying various combinations when parsing, so AA is the same as Aa, aA, and aa. At the end of the day, it’s probably not really common you have enum members like this anyway.
I see.
I found the relevant introduction in the API document.
Thank you!