mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 22:08:59 +00:00
This patch teaches UpdateExpression how to use a Reference. Some other changes were necessary to keep tests working: A Reference can now also refer to a local or global variable. This is not fully aligned with the spec since we don't have a Record concept.
14 lines
216 B
JavaScript
14 lines
216 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
var o = {};
|
|
o.f = 1;
|
|
|
|
assert(o.f++ === 1);
|
|
assert(++o.f === 3);
|
|
assert(isNaN(++o.missing));
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|