mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-30 16:45:38 +00:00
fixes #22791 This pull request introduces a minor improvement to the handling of immutable variables in the compiler and adds a new test case for nested case objects. The most important changes are: ### Compiler improvements * Updated the `isLet` guard in `compiler/guards.nim` to recognize `skConst` symbols as immutable variables, ensuring that constants are correctly identified alongside lets and other immutable types. ### Test coverage * Added a new test in `tests/objvariant/tcorrectcheckedfield.nim` for bug #22791, verifying correct pattern matching and field access in nested `case` objects with constants.