TypeScript/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt
2014-07-18 16:16:28 -07:00

7 lines
349 B
Plaintext

==== tests/cases/compiler/collisionThisExpressionAndAmbientClassInGlobal.ts (1 errors) ====
declare class _this { // no error - as no code generation
}
var f = () => this;
var a = new _this(); // Error
~~~~~
!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.