12 lines
No EOL
431 B
Text
12 lines
No EOL
431 B
Text
==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers2.ts (2 errors) ====
|
|
class C {
|
|
static foo = this; // error
|
|
~~~~
|
|
!!! 'this' cannot be referenced in a static property initializer.
|
|
}
|
|
|
|
class C2<T> {
|
|
static foo = this; // error
|
|
~~~~
|
|
!!! 'this' cannot be referenced in a static property initializer.
|
|
} |