Files
ladybird/Tests/LibJS/AST/input/arrow-functions.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

13 lines
200 B
JavaScript

function uses_arrow() {
let x = 1;
const f = y => x + y;
return f(2);
}
function arrow_with_this() {
const f = () => this;
return f();
}
const top_level_arrow = (a, b) => a + b;