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);
|
||||
|
||||
// Symbols with duplicate get and set.
|
||||
expr = Symbol("hey");
|
||||
a = {get [expr]() { return 3; }, set[expr](v) { throw 2; },
|
||||
set [expr] (w) { throw 4; }, get[expr](){return 5; }};
|
||||
assertEq(a[expr], 5);
|
||||
assertThrowsValue(() => { a[expr] = 7; }, 4);
|
||||
if (typeof Symbol === "function") {
|
||||
expr = Symbol("hey");
|
||||
a = {get [expr]() { return 3; }, set[expr](v) { throw 2; },
|
||||
set [expr] (w) { throw 4; }, get[expr](){return 5; }};
|
||||
assertEq(a[expr], 5);
|
||||
assertThrowsValue(() => { a[expr] = 7; }, 4);
|
||||
}
|
||||
|
||||
// expressions with side effects are called in the right order
|
||||
log = "";
|
||||
|
Loading…
Reference in New Issue
Block a user