TypeScript/tests/baselines/reference/computedPropertyNames13_ES6.js
Daniel Rosenwasser 5fc2ec701b Merge branch 'master' into thanksLua
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/FunctionPropertyAssignments5_es6.js
	tests/baselines/reference/computedPropertyNames9_ES6.js
	tests/baselines/reference/computedPropertyNamesDeclarationEmit3.js
	tests/baselines/reference/computedPropertyNamesDeclarationEmit4.js
	tests/baselines/reference/parserES5ComputedPropertyName3.js
	tests/baselines/reference/parserES5ComputedPropertyName4.js
2015-02-17 17:43:06 -08:00

39 lines
883 B
JavaScript

//// [computedPropertyNames13_ES6.ts]
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`]() { }
}
//// [computedPropertyNames13_ES6.js]
var s;
var n;
var a;
var C = (function () {
function C() {
}
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 () { };
return C;
})();