mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-31 20:49:06 +00:00
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.