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

23 lines
736 B
Plaintext

==== tests/cases/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.ts (2 errors) ====
class a {
public foo() {
}
}
class b extends a {
public foo() {
var _this = 10;
~~~~~
!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
var f = () => super.foo();
}
}
class b2 extends a {
public foo() {
var f = () => {
var _this = 10;
~~~~~
!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
return super.foo()
}
}
}