-
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
bugSomething isn't workingSomething isn't workinglanguage deficiencyBlocked on missing language or compiler featuresBlocked on missing language or compiler features
Description
This is a nasty one.
The builtin PartialOrd implementation compares enums by discriminant first, and uses that to determine whether entire variants are greater or less than each other. This is a problem because the discriminants for the original and archived enums may not be ordered the same way, so even if we could compare the discriminants of the two, they wouldn't be guaranteed to provide the same ordering between original and archived values.
Right now we manually assign a new discriminant that may not be the same as the true discriminant, and use that to determine whether two enums are greater or less. This still doesn't provide the same orderings between original and archived values, but it's what we can do.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglanguage deficiencyBlocked on missing language or compiler featuresBlocked on missing language or compiler features