Skip to content

Fix: Macro.expand/2 should not expand __ENV__ on :match context #13807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Sep 6, 2024

Close #13806

We had two options:

  • assert_not_match_context in expand_once (but that would duplicate the logic from :elixir_expand)
  • do not expand and let it fail later - consistent with what happens for __CALLER__ or __STACKTRACE__ => went with this one

@sabiwara sabiwara merged commit 9b9ab99 into elixir-lang:main Sep 6, 2024
9 checks passed
@sabiwara sabiwara deleted the expand-env branch September 6, 2024 07:23
@sabiwara sabiwara restored the expand-env branch September 6, 2024 07:23
@sabiwara sabiwara deleted the expand-env branch September 6, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Crash when compiling a test asserting on __ENV__
2 participants