TypeScript/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.errors.txt
2014-09-12 13:35:07 -07:00

14 lines
509 B
Plaintext

tests/cases/compiler/thisInArrowFunctionInStaticInitializer1.ts(6,7): error TS2334: 'this' cannot be referenced in a static property initializer.
==== 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);
~~~~
!!! error TS2334: 'this' cannot be referenced in a static property initializer.
}
}