odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.12k stars 550 forks source link

Fix `slice.unique` wrong result #3770

Closed skaman closed 2 weeks ago

skaman commented 2 weeks ago

When you try to make this array unique []int{1, 2, 4, 4, 5} you get []int{1, 4, 5} instead of []int{1, 2, 4, 5}. Our index i should be increased even with both indices i and j have the same value

This PR is related to the issue: https://github.com/odin-lang/Odin/issues/3769