Nicolò Ribaudo ec69b4bb12 Save full descriptor instead of only value for private fields. (#8318)
* Save full descriptor instead of only value for private fields.

Decorators can make private fields non-writable, so we need to store this
information somewhere.
The descriptor can also be used to implement private accessors.
2018-07-27 16:24:57 -04:00

44 lines
889 B
JavaScript

var A =
/*#__PURE__*/
function () {
"use strict";
function A() {
babelHelpers.classCallCheck(this, A);
}
babelHelpers.createClass(A, [{
key: "foo",
value: function foo() {
return "bar";
}
}]);
return A;
}();
var B =
/*#__PURE__*/
function (_A) {
"use strict";
babelHelpers.inherits(B, _A);
function B(...args) {
var _this;
babelHelpers.classCallCheck(this, B);
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(B).call(this, ...args));
_foo.set(babelHelpers.assertThisInitialized(babelHelpers.assertThisInitialized(_this)), {
writable: true,
value: babelHelpers.get(babelHelpers.getPrototypeOf(B.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this))
});
return _this;
}
return B;
}(A);
var _foo = new WeakMap();