Felipe Armoni fdfe97879e
Disallow reinitializing private elements (#13601)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-08-30 12:44:38 +02:00

17 lines
346 B
JavaScript

var _x = /*#__PURE__*/new WeakMap();
var C = function C() {
"use strict";
babelHelpers.classCallCheck(this, C);
babelHelpers.defineProperty(this, "y", babelHelpers.classPrivateFieldGet(this, _x));
babelHelpers.classPrivateFieldInitSpec(this, _x, {
writable: true,
value: void 0
});
};
expect(() => {
new C();
}).toThrow();