mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Follow-up to bug 1041631 - Make a new test work whether Symbol is defined or not. no_r=me, a=RyanVM on a CLOSED TREE.
This commit is contained in:
parent
949bb5e354
commit
2fde11dde5
@ -215,11 +215,13 @@ assertEq(a.hey, 3);
|
|||||||
assertThrowsValue(() => { a.hey = 5; }, 2);
|
assertThrowsValue(() => { a.hey = 5; }, 2);
|
||||||
|
|
||||||
// Symbols with duplicate get and set.
|
// Symbols with duplicate get and set.
|
||||||
expr = Symbol("hey");
|
if (typeof Symbol === "function") {
|
||||||
a = {get [expr]() { return 3; }, set[expr](v) { throw 2; },
|
expr = Symbol("hey");
|
||||||
set [expr] (w) { throw 4; }, get[expr](){return 5; }};
|
a = {get [expr]() { return 3; }, set[expr](v) { throw 2; },
|
||||||
assertEq(a[expr], 5);
|
set [expr] (w) { throw 4; }, get[expr](){return 5; }};
|
||||||
assertThrowsValue(() => { a[expr] = 7; }, 4);
|
assertEq(a[expr], 5);
|
||||||
|
assertThrowsValue(() => { a[expr] = 7; }, 4);
|
||||||
|
}
|
||||||
|
|
||||||
// expressions with side effects are called in the right order
|
// expressions with side effects are called in the right order
|
||||||
log = "";
|
log = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user