From de9547cc9e6134d83f790f0314346236cfca1dbd Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 23 Jan 2015 17:08:08 -0800 Subject: [PATCH] Update type checking for lexical binding due to merge with master --- src/compiler/checker.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f3f90b633a..fd93858c24 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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) {