2015-02-04 02:43:31 +01:00
|
|
|
//// [computedPropertyNames16_ES5.ts]
|
|
|
|
var s: string;
|
|
|
|
var n: number;
|
|
|
|
var a: any;
|
|
|
|
class C {
|
|
|
|
get [s]() { return 0;}
|
|
|
|
set [n](v) { }
|
|
|
|
static get [s + s]() { return 0; }
|
|
|
|
set [s + n](v) { }
|
|
|
|
get [+s]() { return 0; }
|
|
|
|
static set [""](v) { }
|
|
|
|
get [0]() { return 0; }
|
|
|
|
set [a](v) { }
|
|
|
|
static get [<any>true]() { return 0; }
|
|
|
|
set [`hello bye`](v) { }
|
|
|
|
get [`hello ${a} bye`]() { return 0; }
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [computedPropertyNames16_ES5.js]
|
|
|
|
var s;
|
|
|
|
var n;
|
|
|
|
var a;
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
|
|
|
Object.defineProperty(C.prototype, s, {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, n, {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C, s + s, {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, s + n, {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, +s, {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C, "", {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, 0, {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, a, {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C, true, {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, "hello bye", {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
Object.defineProperty(C.prototype, "hello " + a + " bye", {
|
2015-02-21 23:43:45 +01:00
|
|
|
get: function () { return 0; },
|
2015-02-04 02:43:31 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
return C;
|
|
|
|
})();
|