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
18 lines
884 B
Plaintext
18 lines
884 B
Plaintext
tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
|
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES6.ts (2 errors) ====
|
|
class Foo { x }
|
|
class Foo2 { x; y }
|
|
|
|
class C {
|
|
[s: string]: Foo2;
|
|
|
|
// Computed properties
|
|
[""]: Foo;
|
|
~~~~
|
|
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
|
|
~~~~~~~~~~
|
|
!!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
|
} |