Commit 8d99e85
lowering: increment world age after toplevel expressions (#59703)
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)1 parent 126cd3e commit 8d99e85
2 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5032 | 5032 | | |
5033 | 5033 | | |
5034 | 5034 | | |
| 5035 | + | |
5035 | 5036 | | |
5036 | 5037 | | |
5037 | 5038 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
0 commit comments