Files
ladybird/Tests/LibJS/AST/input/with-statement.js
Andreas Kling f7c961136f Tests/LibJS: Add AST dump test cases
Add 39 test cases exercising AST dump output and scope analysis.
Tests cover local/global identifier marking, eval/with poisoning,
destructuring, closures, hoisting, classes, generators, and more.
2026-02-10 02:05:20 +01:00

23 lines
333 B
JavaScript

function with_basic(obj) {
with (obj) {
return x;
}
}
function with_and_local(obj) {
let y = 1;
with (obj) {
return x + y;
}
}
function with_nested_function(obj) {
with (obj) {
function inner() {
let z = 2;
return z;
}
return inner();
}
}