2015-02-03 02:36:45 +01:00
|
|
|
//// [computedPropertyNames13_ES6.ts]
|
2015-01-14 01:10:24 +01:00
|
|
|
var s: string;
|
|
|
|
var n: number;
|
|
|
|
var a: any;
|
|
|
|
class C {
|
|
|
|
[s]() {}
|
|
|
|
[n]() { }
|
|
|
|
static [s + s]() { }
|
|
|
|
[s + n]() { }
|
|
|
|
[+s]() { }
|
|
|
|
static [""]() { }
|
|
|
|
[0]() { }
|
|
|
|
[a]() { }
|
|
|
|
static [<any>true]() { }
|
|
|
|
[`hello bye`]() { }
|
|
|
|
static [`hello ${a} bye`]() { }
|
|
|
|
}
|
|
|
|
|
2015-02-03 02:36:45 +01:00
|
|
|
//// [computedPropertyNames13_ES6.js]
|
2015-01-14 01:10:24 +01:00
|
|
|
var s;
|
|
|
|
var n;
|
|
|
|
var a;
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C.prototype[s] = function () { };
|
|
|
|
C.prototype[n] = function () { };
|
|
|
|
C[s + s] = function () { };
|
|
|
|
C.prototype[s + n] = function () { };
|
|
|
|
C.prototype[+s] = function () { };
|
|
|
|
C[""] = function () { };
|
|
|
|
C.prototype[0] = function () { };
|
|
|
|
C.prototype[a] = function () { };
|
|
|
|
C[true] = function () { };
|
|
|
|
C.prototype[`hello bye`] = function () { };
|
|
|
|
C[`hello ${a} bye`] = function () { };
|
2015-01-14 01:10:24 +01:00
|
|
|
return C;
|
|
|
|
})();
|