lean4-htt/tests/pkg
Joachim Breitner b2aec782eb
fix: re-privatize constant name prefix in realizeConst to avoid diamond import collisions (#12964)
This PR fixes an issue where `realizeConst` would generate auxiliary
declarations
(like `_sparseCasesOn`) using the original defining module's private
name prefix
rather than the realizing module's prefix. When two modules
independently realized
the same imported constant, they produced identically-named auxiliary
declarations,
causing "environment already contains" errors on diamond import.

The fix re-privatizes the constant name under the current module before
passing it
to `withDeclNameForAuxNaming`, ensuring each realizing module generates
distinctly
named auxiliary declarations.

Fixes #12825

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 13:54:50 +00:00
..
builtin_attr chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
cbv_attr chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
debug chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
def_clash chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
deriving chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
frontend chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
initialize chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
issue12825 fix: re-privatize constant name prefix in realizeConst to avoid diamond import collisions (#12964) 2026-03-18 13:54:50 +00:00
leanchecker chore: check test output before exit code in piles (#12947) 2026-03-17 16:34:21 +00:00
linter_set chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
misc chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
mod_clash chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
module chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
path with spaces chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
prv chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
rebuild chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
setup chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
signal fix: use process signal numbers from correct architecture (#12900) 2026-03-17 13:33:13 +00:00
structure_docstrings chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
test_extern chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
user_attr chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
user_attr_app chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
user_ext chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
user_opt chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
user_plugin chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
ver_clash chore: improve how test suite interacts with stages (#12913) 2026-03-16 15:20:03 +00:00
.gitignore chore: migrate pkg tests (#12889) 2026-03-11 18:55:46 +00:00