2015-02-19 22:11:59 +01:00
|
|
|
//// [computedPropertyNames50_ES5.ts]
|
|
|
|
|
|
|
|
var x = {
|
|
|
|
p1: 10,
|
|
|
|
get foo() {
|
|
|
|
if (1 == 1) {
|
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
get [1 + 1]() {
|
|
|
|
throw 10;
|
|
|
|
},
|
|
|
|
set [1 + 1]() {
|
|
|
|
// just throw
|
|
|
|
throw 10;
|
|
|
|
},
|
|
|
|
get [1 + 1]() {
|
|
|
|
return 10;
|
|
|
|
},
|
|
|
|
get foo() {
|
|
|
|
if (2 == 2) {
|
|
|
|
return 20;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
p2: 20
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [computedPropertyNames50_ES5.js]
|
|
|
|
var x = (_a = {
|
2015-02-20 23:16:09 +01:00
|
|
|
p1: 10,
|
|
|
|
get foo() {
|
|
|
|
if (1 == 1) {
|
2015-02-19 22:11:59 +01:00
|
|
|
return 10;
|
2015-02-20 23:16:09 +01:00
|
|
|
}
|
|
|
|
}
|
2015-02-21 06:53:44 +01:00
|
|
|
}, _a.p1 =
|
|
|
|
10, _a.foo = Object.defineProperty({ get: function () {
|
2015-02-22 00:11:37 +01:00
|
|
|
if (1 == 1) {
|
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
}, enumerable: true, configurable: true }), _a[1 + 1] = Object.defineProperty({ get: function () {
|
|
|
|
throw 10;
|
|
|
|
}, enumerable: true, configurable: true }), _a[1 + 1] = Object.defineProperty({ set: function () {
|
|
|
|
// just throw
|
|
|
|
throw 10;
|
|
|
|
}, enumerable: true, configurable: true }), _a[1 + 1] = Object.defineProperty({ get: function () {
|
2015-02-20 23:16:09 +01:00
|
|
|
return 10;
|
2015-02-22 00:11:37 +01:00
|
|
|
}, enumerable: true, configurable: true }), _a.p2 =
|
2015-02-21 06:53:44 +01:00
|
|
|
20,
|
|
|
|
_a);
|
2015-02-19 22:11:59 +01:00
|
|
|
var _a;
|