mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 00:55:32 -05:00
Update type checking for lexical binding due to merge with master
This commit is contained in:
@@ -4832,9 +4832,12 @@ module ts {
|
||||
container = getThisContainer(container, /* includeArrowFunctions */ false);
|
||||
|
||||
// When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code
|
||||
if (compilerOptions.target < ScriptTarget.ES6) {
|
||||
needToCaptureLexicalThis = true;
|
||||
if (compilerOptions.target >= ScriptTarget.ES6) {
|
||||
needToCaptureLexicalThis = false;
|
||||
}
|
||||
else {
|
||||
needToCaptureLexicalThis = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch (container.kind) {
|
||||
|
||||
Reference in New Issue
Block a user