You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if this is the expected behaviour, but if it is, can someone explain why?
It seems that if you set the value of the const when declaring "enums", the type check breaks down. However, if you use iota or do not set the "enum" value, it works as expected.
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
enum does not enforce type check under certain circumstances
spec: enum does not enforce type check under certain circumstances
Jan 1, 2015
Buggy Code : https://play.golang.org/p/j4kMAv2hvI
Expected : https://play.golang.org/p/UuEhvMLfr7
I am not sure if this is the expected behaviour, but if it is, can someone explain why?
It seems that if you set the value of the
const
when declaring "enums", the type check breaks down. However, if you useiota
or do not set the "enum" value, it works as expected.The text was updated successfully, but these errors were encountered: