LibJS: Allow "delete someGlobalVariable"

This is solved by allowing Identifier nodes to produce a Reference with
the global object as base.
This commit is contained in:
Andreas Kling 2020-04-27 12:37:27 +02:00
commit 3c4a9e421f
Notes: sideshowbarker 2024-07-19 07:13:50 +09:00
6 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,16 @@
load("test-common.js");
try {
a = 1;
assert(delete a === true);
assertThrowsError(() => {
a;
}, {
error: ReferenceError
});
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}