mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Add bytecode tests verifying identifier resolution produces correct register-backed locals, global lookups, argument indices, and environment lookups for eval/with/captured cases. Add runtime tests for destructuring assignment patterns with expression defaults: class expressions (named/anonymous), function expressions, arrow functions, nested destructuring, eval in defaults, MemberExpression targets with setter functions, and class name scoping.
6 lines
170 B
JavaScript
6 lines
170 B
JavaScript
// Test that identifiers at program scope are promoted to globals.
|
|
// The bytecode should use GetGlobal/SetGlobal, not GetBinding/SetBinding.
|
|
|
|
var x = 1;
|
|
console.log(x);
|