Skip to content
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

sort/compare on string does not work correctly when another sort is used within the compare function #2621

Closed
Oldes opened this issue Sep 10, 2024 · 0 comments
Labels

Comments

@Oldes
Copy link
Owner

Oldes commented Sep 10, 2024

Can be demonstrated with code like:

s1: sort/compare "abcd" func[a b][s2: sort/compare/reverse "1234" func[a b][a < b] a < b]
s1 ;== "dcab" ;;<--- should be "abcd"
s2 ;== "4321" ;;<--- OK

or:

s1: sort/compare "abcdabcd" func[a b][s2: sort/compare "áéíáéíáéí" func[a b][a < b] a < b]
s1 ;== "ddbacabc" ;;<--- should be "aabbccdd"
s2 ;== "áááéééííí" ;;<--- OK

Related to #1100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant