TypeScript/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.errors.txt
2014-07-12 17:30:19 -07:00

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.
}
}