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

17 lines
494 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 C = function C() {
_classCallCheck(this, C);
};
var _ref = (_classNameTDZError("C"), C) + 3;
Object.defineProperty(C, _ref, {
configurable: true,
enumerable: true,
writable: true,
value: 3
});