2014-09-12 22:35:07 +02:00
|
|
|
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;
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! 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;
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! 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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|