Files
ladybird/Tests/LibJS/Bytecode/input/for-of-cond-rhs-block-order.js
Andreas Kling d88374e119 Tests/LibJS: Add bytecode test for for-of with conditional in RHS
This adds a test case where the for-of iterable is a sequence
expression containing a conditional expression. The C++ pipeline
creates loop blocks before evaluating the iterable, giving them lower
block numbers, while the Rust pipeline evaluates the iterable first.
2026-03-01 21:20:54 +01:00

7 lines
113 B
JavaScript

function f(o, i) {
for (let [r, n] of (o ? o.x : i, Object.entries({}))) {
r;
}
}
f(null, null);