15 lines
No EOL
657 B
Text
15 lines
No EOL
657 B
Text
tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts(5,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
|
|
|
|
|
|
==== tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts (1 errors) ====
|
|
declare function alert(message?: any): void;
|
|
|
|
var x = {
|
|
doStuff: (callback) => () => {
|
|
var _this = 2;
|
|
~~~~~
|
|
!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
|
|
return callback(this);
|
|
}
|
|
}
|
|
alert(x.doStuff(x => alert(x))); |