Skip to content

Conversation

litlighilit
Copy link
Contributor

@litlighilit litlighilit commented Sep 12, 2025

fixes #25162
ref #24825

@tersec
Copy link
Contributor

tersec commented Sep 12, 2025

Tests?

@litlighilit
Copy link
Contributor Author

See source of
contains/hasKey/containsOrIncl and another variant of withValue

all use index >= 0 to mean key existing

@litlighilit
Copy link
Contributor Author

litlighilit commented Sep 12, 2025

The failed cases are those whose index == 0,
which is not ubiquitous example.

If really needing corresponding test added to tests/, I may add what I mentioned on the origin issue #25162

@ringabout
Copy link
Member

Tests are added for preventing of regression. Though in this case, it could hardly regress. But it can also ease and accelerate review if tests are there to ensure that this patch works

@Araq Araq merged commit ff9cae8 into nim-lang:devel Sep 12, 2025
25 of 26 checks passed
@Araq
Copy link
Member

Araq commented Sep 12, 2025

@narimiran please backport

Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from ff9cae8

Hint: mm: orc; opt: speed; options: -d:release
183052 lines; 8.764s; 660.707MiB peakmem

narimiran pushed a commit that referenced this pull request Sep 12, 2025
@litlighilit litlighilit deleted the lit-fix-tables branch September 12, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

withValue for immut tab wrong chk cond
4 participants