TypeScript/tests/baselines/reference/computedPropertyNames14.errors.txt

30 lines
1.9 KiB
Text
Raw Normal View History

2015-01-16 02:54:34 +01:00
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts (6 errors) ====
var b: boolean;
class C {
[b]() {}
~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
static [true]() { }
~~~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
[[]]() { }
~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
static [{}]() { }
~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
[undefined]() { }
~~~~~~~~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
static [null]() { }
~~~~~~
2015-01-16 02:54:34 +01:00
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
}