fixes #25908; resolves lent enum disambiguation (#25929)

fixes #25908

When an enum identifier is resolved as an `nkSymChoice`, one of the
candidates may come from a loop-local view and carry `tyVar` or
`tyLent`.

Enum disambiguation should compare the underlying enum type only.
Otherwise a pure-enum field can win incorrectly even though the intended
symbol is already present in the choice set.

Keep the `includePureEnum` lookup path for enum-typed expectations so
#23976 still works, but normalize `var`/`lent` only at the symchoice
selection point.

(cherry picked from commit 6eef0cc2d5)
This commit is contained in:
ringabout
2026-06-23 18:22:29 +08:00
committed by narimiran
parent 13ab5c5d23
commit f314df4efe
3 changed files with 15 additions and 1 deletions

View File

@@ -158,6 +158,7 @@ pkg "sim"
pkg "smtp", "nimble compileExample"
pkg "snip", "nimble test", "https://github.com/genotrance/snip"
pkg "ssostrings", "nim c -r tests/tssostrings.nim"
pkg "ssz_serialization", "nim c -r tests/test_all.nim"
pkg "stew"
pkg "stint", "nimble test_internal"
pkg "strslice"