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

27 lines
1.1 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts(7,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts(14,17): 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/collisionThisExpressionAndLocalVarWithSuperExperssion.ts (2 errors) ====
class a {
public foo() {
}
}
class b extends a {
public foo() {
var _this = 10;
~~~~~
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-19 01:13:21 +02:00
var f = () => super.foo();
}
}
class b2 extends a {
public foo() {
var f = () => {
var _this = 10;
~~~~~
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
2014-07-19 01:13:21 +02:00
return super.foo()
}
}
}