ladybird/Libraries/LibJS/Tests/delete-global-variable.js
Andreas Kling 3c4a9e421f LibJS: Allow "delete someGlobalVariable"
This is solved by allowing Identifier nodes to produce a Reference with
the global object as base.
2020-04-28 15:07:08 +02:00

16 lines
235 B
JavaScript

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