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
@intToEnum disables all the safety checks for extern unions, it should just de-duplicate the entries and validate the input data anyway.
One of the accepted proposals was to allow extern enums to contain values that don't map to any particular tags. Idea being that they are non-exhaustive, and have the ABI size of the underlying integer tag type. This allows using extern enums in an ABI, and adding items later while remaining backwards-compatible.
Happy to reconsider this if you are thinking of a potential issue with it?
The broken switch thing is clearly a bug. I propose to resolve it by having the first tag name in declaration order be the canonical name.
Activity
andrewrk commentedon Dec 31, 2019
One of the accepted proposals was to allow extern enums to contain values that don't map to any particular tags. Idea being that they are non-exhaustive, and have the ABI size of the underlying integer tag type. This allows using extern enums in an ABI, and adding items later while remaining backwards-compatible.
Happy to reconsider this if you are thinking of a potential issue with it?
The broken switch thing is clearly a bug. I propose to resolve it by having the first tag name in declaration order be the canonical name.
s-ol commentedon Jan 25, 2020
I'm suddenly hitting the error that leads to this issue, and there is no traceback so I'm not sure what I shouldn't be doing:
(this being a TODO is okay I guess, but it would be great if it left a full stack trace at least)