mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
f31f50836d032d6c237272a3b2e733a92a3ee619
withNamespace now correctly calls popScopes after running (#12647)
This PR adds the missing `popScopes` call to `withNamespace`, which previously only dropped scopes from the elaborator's `Command.State` but did not pop the environment's `ScopedEnvExtension` state stacks. This caused scoped syntax declarations to leak keywords outside their namespace when `withNamespace` had been called. Closes #12630 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.
Languages
Lean
94.3%
C++
4.1%
Python
0.6%
Shell
0.4%
CMake
0.3%