mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 18:08:15 +02:00
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.
13 lines
200 B
JavaScript
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;
|