2015-02-04 02:43:31 +01:00
|
|
|
//// [computedPropertyNames10_ES5.ts]
|
|
|
|
var s: string;
|
|
|
|
var n: number;
|
|
|
|
var a: any;
|
|
|
|
var v = {
|
|
|
|
[s]() { },
|
|
|
|
[n]() { },
|
|
|
|
[s + s]() { },
|
|
|
|
[s + n]() { },
|
|
|
|
[+s]() { },
|
|
|
|
[""]() { },
|
|
|
|
[0]() { },
|
|
|
|
[a]() { },
|
|
|
|
[<any>true]() { },
|
|
|
|
[`hello bye`]() { },
|
|
|
|
[`hello ${a} bye`]() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [computedPropertyNames10_ES5.js]
|
|
|
|
var s;
|
|
|
|
var n;
|
|
|
|
var a;
|
2015-02-05 03:35:04 +01:00
|
|
|
var v = (_a = {},
|
|
|
|
_a[s] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[n] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[s + s] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[s + n] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[+s] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[""] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[0] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[a] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a[true] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a["hello bye"] = function () {
|
2015-02-04 02:43:31 +01:00
|
|
|
},
|
2015-02-05 03:35:04 +01:00
|
|
|
_a["hello " + a + " bye"] = function () {
|
|
|
|
},
|
|
|
|
_a);
|
|
|
|
var _a;
|