lean4-htt/src
Wojciech Różowski c54f691f4a
fix: end_local_scope does not work with compound namespace names (#13360)
This PR fixes #13268 where `local macro` (and other local declarations)
with compound names of depth ≥ 3 would silently lose their local
entries.

When `expandNamespacedDeclaration` rewrites e.g. `local macro (name :=
A.B.C) ...` into `namespace A.B.C; end_local_scope; ...; end A.B.C`, the
compound `namespace A.B.C` pushes multiple scopes, but `end_local_scope`
only marked the topmost scope as non-delimiting. This meant
`addLocalEntry`'s stack traversal would stop at the first unmarked
scope, and the local entry would be lost when the namespace scopes were
popped.

The fix parameterizes `end_local_scope` with a depth argument so it
marks exactly the right number of scope levels as non-delimiting.
`expandNamespacedDeclaration` now passes `ns.getNumParts` as the depth,
and `expandInCmd` passes `1`.

Closes #13268
2026-04-13 10:05:26 +00:00
..
bin perf: separate meta and non-meta initializers (#12016) 2026-02-26 08:05:19 +00:00
cmake fix: use commondir to resolve git directory in worktrees (#13045) 2026-04-11 06:45:02 +00:00
include/lean feat: Runtime.hold (#13270) 2026-04-07 08:44:35 +00:00
Init feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
initialize
kernel chore: fix spelling errors (#13274) 2026-04-04 07:34:34 +00:00
lake feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
Lean fix: end_local_scope does not work with compound namespace names (#13360) 2026-04-13 10:05:26 +00:00
library fix: potential Array.get!Internal leaks part 2 (#13148) 2026-03-27 02:51:39 +00:00
runtime fix: match stub signature of lean_uv_dns_get_info to real implementation (#13234) 2026-04-07 09:39:53 +00:00
shell chore: move test suite setup to tests/CMakeLists.txt (#12278) 2026-02-03 13:22:20 +00:00
Std feat: add linter.redundantVisibility for redundant private/public modifiers (#13132) 2026-04-13 08:34:20 +00:00
util feat: allow deprecating options (#13195) 2026-04-02 14:44:11 +00:00
cadical.mk
CMakeLists.txt chore: cache-get Make target (#13341) 2026-04-12 17:37:52 +00:00
config.h.in
githash.h.in
Init.lean feat: add cbv_simproc infrastructure for user-extensible cbv simplification procedures (#12597) 2026-03-10 10:59:13 +00:00
lakefile.toml.in chore: use weakLeanArgs for Lake plugin (#13335) 2026-04-09 00:02:39 +00:00
lean-toolchain chore: relative lean-toolchains (#12652) 2026-02-25 10:23:35 +00:00
Lean.lean refactor: move getOriginalConstKind? into its own module to avoid future import cycle (#12265) 2026-02-01 16:18:51 +00:00
lean.mk.in
Leanc.lean
LeanChecker.lean refactor: remove Lean.Environment.replay from core (#12972) 2026-03-18 22:11:42 +00:00
LeanIR.lean chore: fixes from #13103 "enable separate codegen" (#13241) 2026-04-02 11:13:22 +00:00
out
Std.lean
stdlib.make.in chore: strip binaries only in release builds (#13208) 2026-03-31 17:18:43 +00:00
stdlib_flags.h chore: consistent build flags between USE_LAKE ON and OFF (#12941) 2026-03-17 11:02:55 +00:00
version.h.in