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); + }; + }(); + })(); + } +}