Skip to content

fix(compiler): check every clause under effect tags - #3444

Closed
adilalperenciftci wants to merge 1 commit into
aether-lang-dev:mainfrom
adilalperenciftci:fix/effect-tags-multiclause
Closed

adilalperenciftci wants to merge 1 commit into
aether-lang-dev:mainfrom
adilalperenciftci:fix/effect-tags-multiclause

Conversation

@adilalperenciftci

Copy link
Copy Markdown
Contributor

Summary

I traced the effect-tag gap to function-clause lookup: the checker scanned only the annotated clause and followed only the first clause of a transitive callee. A later pattern clause could therefore reach a forbidden capability while @pure, @no_fs, @no_net, or @no_os still passed.

This change:

  1. checks every clause sharing the tagged function name;
  2. follows every clause of a resolved callee during transitive effect analysis;
  3. adds direct and transitive multi-clause rejection cases.

Verification

  • BEFORE: both new multi-clause cases compiled.
  • AFTER: both are rejected with the expected os effect diagnostic.
  • sh tests/integration/effect_tags/test_effect_tags.sh
  • sh tests/integration/aetherc_emit_effects/test_aetherc_emit_effects.sh
  • make check-changelog
  • make check-tests
  • make test (634 passed)

Signed-off-by: Adil Alperen Çiftci adilalperenciftci@users.noreply.github.com

Signed-off-by: Adil Alperen Çiftci <adilalperenciftci@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 08:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@paul-hammant

Copy link
Copy Markdown
Collaborator

Thanks, reviewed and folded into the batch #3456 with your authorship kept on the commit. This PR will be closed when #3456 merges.

🤖 Generated with Claude Code

@paul-hammant

Copy link
Copy Markdown
Collaborator

Merged as part of #3456 (merge 9364d6b), with your authorship on the commit. Thank you, @adilalperenciftci: this was a real fix, carefully tested, and it's appreciated.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants