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
The sorting tries to create a lowercase>Capital>SCREAMING relation, but
does this in a way that causes non-transitive behavior for identifiers
starting with `_`. These identifiers are neither Capital nor SCREAMING
so they are always compared via lexicographic ASCII matching.
This causes a problem, because `A < _ < a` lexicographically in ASCII.
But `A > a` with our special case rules!
When doing these manual comparisons, hitting these issues is very easy.
To fix this, we can simply create a sorting key that mirrors our desired
order and sort that normally. This way, it's guaranteed to have all the
necessary properties.
By *always* sorting uppercase identifiers first, we ensure that `A > _`.
0 commit comments