11 lines
344 B
Plaintext
11 lines
344 B
Plaintext
|
==== tests/cases/compiler/thisInArrowFunctionInStaticInitializer1.ts (1 errors) ====
|
||
|
function log(a) { }
|
||
|
|
||
|
class Vector {
|
||
|
static foo = () => {
|
||
|
// 'this' should not be available in a static initializer.
|
||
|
log(this);
|
||
|
~~~~
|
||
|
!!! 'this' cannot be referenced in a static property initializer.
|
||
|
}
|
||
|
}
|