<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 --> <!-- Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ --> <!-- If you have a QUESTION: THIS IS NOT A FORUM FOR QUESTIONS. Ask questions at http://stackoverflow.com/questions/tagged/typescript or https://gitter.im/Microsoft/TypeScript --> <!-- If you have a SUGGESTION: Most suggestion reports are duplicates, please search extra hard before logging a new suggestion. See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> <!-- If you have a BUG: Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 2.7.2 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** `_this` **Code** Real world example https://github.com/webpack/webpack/blob/7f11210cffc58820b4cdd086934398306882c338/lib/Compilation.js#L454 **Expected behavior:** No Error **Actual behavior:** ``` TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** https://github.com/webpack/webpack/pull/6862
Activity
mhegazy commentedon Mar 26, 2018
Here is a simplified repro:
Fix #22866: Condition checking for name collision of generated variab…
mhegazy commentedon Mar 26, 2018
Mohsen Azimi (@mohsen1) fix should be in tonight's
typescript@next.Merge pull request #22886 from Microsoft/Fix22866