12 lines
448 B
Plaintext
12 lines
448 B
Plaintext
==== tests/cases/compiler/collisionThisExpressionAndLocalVarInLambda.ts (1 errors) ====
|
|
declare function alert(message?: any): void;
|
|
|
|
var x = {
|
|
doStuff: (callback) => () => {
|
|
var _this = 2;
|
|
~~~~~
|
|
!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.
|
|
return callback(this);
|
|
}
|
|
}
|
|
alert(x.doStuff(x => alert(x))); |