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

10 lines
560 B
Plaintext
Raw Normal View History

tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts(4,13): error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.
2014-07-19 01:13:21 +02:00
==== tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts (1 errors) ====
declare class _this { // no error - as no code generation
}
var f = () => this;
var a = new _this(); // Error
~~~~~
!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.