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
47 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
KristofferC pushed a commit that referenced this pull request Oct 10, 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

(cherry picked from commit 0c8768f)
KristofferC pushed a commit that referenced this pull request Oct 12, 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

(cherry picked from commit 0c8768f)
KristofferC pushed a commit that referenced this pull request Oct 14, 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

(cherry picked from commit 0c8768f)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Oct 21, 2025
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.

1.12-rc1 World age issue with macro

4 participants