From af4575c43ee0ce4aa20ed7cbb64d81bbb2b495b9 Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Tue, 8 Mar 2016 08:15:38 -0800 Subject: [PATCH] Expand the regression tests for T2765. --- .../misc/regression-2765/actual.js | 8 ++++++++ .../misc/regression-2765/expected.js | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-2765/actual.js b/packages/babel-core/test/fixtures/transformation/misc/regression-2765/actual.js index 32f7a0ea52..926823c6b6 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-2765/actual.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-2765/actual.js @@ -3,3 +3,11 @@ function f() { this; }; }; + +class Class { + async m() { + var c = async (b) => { + this + } + } +} diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-2765/expected.js b/packages/babel-core/test/fixtures/transformation/misc/regression-2765/expected.js index edb9007102..ec0a231c78 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-2765/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-2765/expected.js @@ -10,3 +10,20 @@ function f() { }; }(); }; + +class Class { + m() { + var _this2 = this; + + return babelHelpers.asyncToGenerator(function* () { + var c = function () { + var ref = babelHelpers.asyncToGenerator(function* (b) { + _this2; + }); + return function c(_x) { + return ref.apply(this, arguments); + }; + }(); + })(); + } +}