MCPcopy Create free account
hub / github.com/nodejs/node / ctor

Function ctor

deps/v8/test/mjsunit/es6/destructuring-assignment.js:544–550  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

542
543(function testSuperCall() {
544 function ctor(body) {
545 return () => eval("(class extends Object { \n" +
546 " constructor() {\n" +
547 body +
548 "\n }\n" +
549 "})");
550 }
551 assertThrows(ctor("({ new: super() } = {})"), SyntaxError);
552 assertThrows(ctor("({ new: x } = { new: super() } = {})"), SyntaxError);
553 assertThrows(ctor("[super()] = []"), SyntaxError);

Calls 1

evalFunction · 0.70

Tested by

no test coverage detected