Mauro Bringolf 6330a152ce Implement TDZ for ClassFieldDefinitionEvaluation (#6855)
* First implementation sketch and testcase

* Use helper instead of inline IIFE's

* minNodeVersion 6.0.0

* Hoisted visitor for subtraversal and fixed edgest case

* Resolve merge conflicts in helpers

* Remove duplicated helper from messing up Git
2017-11-26 16:56:04 +01:00

18 lines
510 B
JavaScript

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classNameTDZError(name) { throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); }
let A = function A() {
_classCallCheck(this, A);
};
var _x$x = {
x: (_classNameTDZError("A"), A) || 0
}.x;
Object.defineProperty(A, _x$x, {
configurable: true,
enumerable: true,
writable: true,
value: void 0
});