blob: 015952271f7e6c9369b5dde5aea11ad5fa148789 [file] [log] [blame]
(function () {
var object = {
2: 2
};
var result = object[2];
if (result !== 2)
throw new Error('bad value:' + result);
}());
(function () {
var object = {
get 2() {
return 1;
},
set 2(value) {
throw new Error(2);
},
};
var result = object[2];
if (result !== 1)
throw new Error('bad value:' + result);
}());
(function () {
var object = {
get 2() {
return 1;
},
set 2(value) {
throw new Error(2);
},
2: 2, // Do not throw new Error(2)
};
var result = object[2];
if (result !== 2)
throw new Error('bad value:' + result);
}());