-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Union types sort order #22664
Comments
For a bit of context, it would be convenient if |
Do we already have code that sorts Union types? Or is that just enforced in the |
No, show just sorts them alphabetically while printing them |
Should probably be done in |
Yeah, I'm stepping through that function right now actually. Is it ok if I just do a separate sort call after normalization but before the Union structs are made? |
Yes that sounds fine. |
The order of types in a Union should be mostly irrelevant, but with WIP work on inline, isbits Union types, the "default initialization" for Arrays requires the underlying Union selector byte to be zeroed out (otherwise an array element could be tagged as an "out of bounds" type for the Union). There are a few conveniences if the Union types sort order followed a pattern like:
The text was updated successfully, but these errors were encountered: