Skip to content

Conversation

Keno
Copy link
Member

@Keno Keno commented Sep 30, 2025

When a macro expands to :toplevel expression, it seems reasonable (as would be if the expression were not wrapped in :toplevel) that any contained struct definitions be available thereafter. For example, this applies to @enum, which countrly causes world age erros when attempting to define a method on an enum within the same expression. Fix this by having lowering insert and explicit latestworld after toplevel.

Fixes #59429

Written by Claude

When a macro expands to `:toplevel` expression, it seems reasonable
(as would be if the expression were not wrapped in `:toplevel`) that
any contained struct definitions be available thereafter. For example,
this applies to `@enum`, which countrly causes world age erros when
attempting to define a method on an enum within the same expression.
Fix this by having lowering insert and explicit `latestworld` after
toplevel.

Fixes #59429
@Keno Keno requested a review from mlechu September 30, 2025 14:53
@KristofferC KristofferC added the backport 1.12 Change should be backported to release-1.12 label Sep 30, 2025
@KristofferC KristofferC mentioned this pull request Sep 30, 2025
31 tasks
@Keno Keno merged commit 0c8768f into master Oct 1, 2025
9 checks passed
@Keno Keno deleted the kf/59429 branch October 1, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.12 Change should be backported to release-1.12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.12-rc1 World age issue with macro
4 participants