Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
hiccuphippo
· 11mo ago · 0 comments
I guess you would need to cast the index to the enum or you get a type error, which should narrow down the possible error locations.
Comments
[–]
ThierryBuilds
11mo ago
Thanks for your response. Wouldn't using the `_` in the enums somehow make almost all integers index "cartable" to the enums?
[–]
hiccuphippo
OP
11mo ago
Yes, but you have to cast it explicitly. If you have two different arrays each with its own enum, the compiler would throw an error if you used the wrong one.
Sorry for the late response and happy new year!
[–]
ThierryBuilds
10mo ago
Thanks for the clarification. Happy new year