* 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>
18 lines
327 B
JavaScript
18 lines
327 B
JavaScript
function test(x) {
|
|
var _x;
|
|
|
|
_x = x;
|
|
var F = /*#__PURE__*/babelHelpers.createClass(function F() {
|
|
"use strict";
|
|
|
|
babelHelpers.classCallCheck(this, F);
|
|
babelHelpers.defineProperty(this, _x, 1);
|
|
});
|
|
x = 'deadbeef';
|
|
expect(new F().foo).toBe(1);
|
|
x = 'wrong';
|
|
expect(new F().foo).toBe(1);
|
|
}
|
|
|
|
test('foo');
|