julia
7c5a4e3b - [JuliaLowering] Fix two labeled-break bugs (#62323)

Commit
93 days ago
[JuliaLowering] Fix two labeled-break bugs (#62323) Fix two bugs in the JuliaLowering implementation of labeled break (#60481): 1. The values of valued breaks (`break label value`) were skipped during scope resolution because `K"break"` is a quoted kind, so any value other than a literal failed an internal assertion during linearization. Resolve the value expression (but not the symbolic label), matching the analogous special case in the variable analysis pass. 2. Validation rejected unlabeled `break` inside an anonymous `@label` block with "unlabeled `break` outside of a `while` or `for` loop", even though anonymous blocks participate in the default break scope and accept plain `break` (as the flisp lowering does). Validation now defers to linearization, which enforces the precise rule: plain `break` through a *named* block remains an error with a targeted message. Found while building the `match` statement prototype on top of the labeled-break machinery. Co-authored-by: Keno Fischer <Keno@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Author
Parents
Loading