You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
goto out of a for loop over a generator fails with a vague 'MIR lowering failed' instead of a diagnostic naming the goto (D69) #1730
Spec: §13.4 (D69, push generators), §13.5b (goto), No Silent Fallbacks.
Found by the D69 implementation (branch gen-push-impl). A for x in g: over a generator lowers its body into a closure passed to Gen.each; break, continue, return, ? and labeled jumps are carried across that call, but a goto whose target is outside the loop is not. Compilation stops with a generic "MIR lowering failed" and no diagnostic naming the construct or its location.
Expected: either the goto is carried across the call like the other exits, or a loud diagnostic at the goto that names this issue. The current failure is loud but tells the user nothing about which statement or why.
Activity
D69: a goto out of `for x in g` leaves the loop body's closure like a…
D69: a goto out of `for x in g` leaves the loop body's closure like a…
D69: a goto out of `for x in g` leaves the loop body's closure like a…
D69: a goto out of `for x in g` leaves the loop body's closure like a…
D69 follow-ups: generic and method gen fn, comprehensions and goto ov…