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

6 lines
315 B
Plaintext

==== tests/cases/compiler/collisionThisExpressionAndAmbientVarInGlobal.ts (1 errors) ====
declare var _this: number; // no error as no code gen
var f = () => this;
_this = 10; // Error
~~~~~
!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.