Repository navigation
fix(compiler): retain enum prefixes for containment - #3449
adilalperenciftci wants to merge 1 commit into
Conversation
Signed-off-by: Adil Alperen Çiftci <adilalperenciftci@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thanks @adilalperenciftci! This landed in #3474, which batched nine of your PRs and merged on 2026-10-30 ( On top of your commit, #3474 enlarges the enum-prefix message buffer in |
Summary
I traced a lexical-containment mismatch to enum lowering.
Color.Redwas rewritten to the generated identifierColor_Redbefore block scopes were checked. As a result,hide Colordid not block the access, whileseal except Colorrejected a prefix the source had explicitly whitelisted.This change preserves the source enum prefix as lowering metadata and uses it for hide/seal checks. Once the prefix passes containment, the generated constant is resolved without applying the block policy a second time to its C name.
Verification
hide ColoracceptedColor.Red;seal except Colorrejected it.sh tests/integration/enum_containment/test_enum_containment.sh./build/ae run tests/regression/test_enum_implicit_selector.ae./build/ae run tests/regression/test_enum_basic.aemake check-changelogmake check-testsmake test(634 passed)Signed-off-by: Adil Alperen Çiftci adilalperenciftci@users.noreply.github.com