Conflicts: src/compiler/emitter.ts tests/baselines/reference/computedPropertyNames12_ES5.errors.txt tests/baselines/reference/computedPropertyNames14_ES5.errors.txt tests/baselines/reference/computedPropertyNames15_ES5.errors.txt tests/baselines/reference/computedPropertyNames17_ES5.errors.txt tests/baselines/reference/computedPropertyNames32_ES5.errors.txt tests/baselines/reference/computedPropertyNames35_ES5.errors.txt tests/baselines/reference/computedPropertyNames3_ES5.errors.txt tests/baselines/reference/computedPropertyNames42_ES5.errors.txt tests/baselines/reference/computedPropertyNames5_ES5.errors.txt tests/baselines/reference/computedPropertyNames6_ES5.errors.txt tests/baselines/reference/computedPropertyNames8_ES5.errors.txt tests/baselines/reference/computedPropertyNames9_ES5.errors.txt tests/baselines/reference/computedPropertyNamesDeclarationEmit3_ES5.errors.txt tests/baselines/reference/computedPropertyNamesDeclarationEmit4_ES5.errors.txt tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.errors.txt
16 lines
No EOL
619 B
Text
16 lines
No EOL
619 B
Text
tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES6.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames9_ES6.ts (1 errors) ====
|
|
function f(s: string): string;
|
|
function f(n: number): number;
|
|
function f<T>(x: T): T;
|
|
function f(x): any { }
|
|
|
|
var v = {
|
|
[f("")]: 0,
|
|
[f(0)]: 0,
|
|
[f(true)]: 0
|
|
~~~~~~~~~
|
|
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
|
|
} |