forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f47737c
commit 0e725ee
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-runtime/test/fixtures/regression/12863/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class B extends A { | ||
b = 8; | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/babel-plugin-transform-runtime/test/fixtures/regression/12863/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"plugins": [ | ||
"proposal-class-properties", | ||
[ | ||
"transform-runtime", | ||
{ | ||
"corejs": { "version": 3, "proposals": true }, | ||
"helpers": true, | ||
"regenerator": true | ||
} | ||
] | ||
], | ||
"presets": [["env", { "modules": false }]] | ||
} |
37 changes: 37 additions & 0 deletions
37
packages/babel-plugin-transform-runtime/test/fixtures/regression/12863/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime-corejs3/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf"; | ||
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty"; | ||
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat"; | ||
|
||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
|
||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
|
||
var B = /*#__PURE__*/function (_A) { | ||
_inherits(B, _A); | ||
|
||
var _super = _createSuper(B); | ||
|
||
function B() { | ||
var _context; | ||
|
||
var _this; | ||
|
||
_classCallCheck(this, B); | ||
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
|
||
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args)); | ||
|
||
_defineProperty(_assertThisInitialized(_this), "b", 8); | ||
|
||
return _this; | ||
} | ||
|
||
return B; | ||
}(A); |