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

16 lines
821 B
Plaintext
Raw Normal View History

tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers2.ts(2,18): error TS2334: 'this' cannot be referenced in a static property initializer.
tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers2.ts(6,18): error TS2334: 'this' cannot be referenced in a static property initializer.
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers2.ts (2 errors) ====
class C {
static foo = this; // error
~~~~
!!! error TS2334: 'this' cannot be referenced in a static property initializer.
2014-07-13 01:04:16 +02:00
}
class C2<T> {
static foo = this; // error
~~~~
!!! error TS2334: 'this' cannot be referenced in a static property initializer.
2014-07-13 01:04:16 +02:00
}