Files
babel/packages/babel-plugin-proposal-class-properties/test/fixtures/regression/6154/output.js
wentout c59870c526 Mark class prototype as read-only (#12115)
* initial code 2 fix the issue #2025

* Mark class prototype as read-only

* Update fixtures

* Fix failure

* Update Babel 8 fixtures

* Disable in loose mode

* Update fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-12-10 21:44:48 +01:00

34 lines
1.0 KiB
JavaScript

var Test = /*#__PURE__*/babelHelpers.createClass(function Test() {
"use strict";
babelHelpers.classCallCheck(this, Test);
var Other = /*#__PURE__*/function (_Test) {
babelHelpers.inherits(Other, _Test);
var _super = babelHelpers.createSuper(Other);
function Other() {
var _thisSuper, _this;
babelHelpers.classCallCheck(this, Other);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
babelHelpers.defineProperty(babelHelpers.assertThisInitialized(_this), "a", function () {
return babelHelpers.get((_thisSuper = babelHelpers.assertThisInitialized(_this), babelHelpers.getPrototypeOf(Other.prototype)), "test", _thisSuper);
});
return _this;
}
return babelHelpers.createClass(Other);
}(Test);
babelHelpers.defineProperty(Other, "a", function () {
return babelHelpers.get(babelHelpers.getPrototypeOf(Other), "test", Other);
});
});