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

13 lines
567 B
Plaintext
Raw Normal View History

tests/cases/compiler/collisionThisExpressionAndLocalVarInFunction.ts(5,9): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-19 01:13:21 +02:00
==== tests/cases/compiler/collisionThisExpressionAndLocalVarInFunction.ts (1 errors) ====
var console: {
log(val: any);
}
function x() {
var _this = 5;
~~~~~
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-19 01:13:21 +02:00
x => { console.log(this.x); };
}