MCPcopy Index your code
hub / github.com/nodejs/node / ext

Function ext

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

Source from the content-addressed store, hash-verified

557
558 class Base { get foo() { return 1; } }
559 function ext(body) {
560 return eval("new (class extends Base {\n" +
561 " constructor() {\n" +
562 body + ";\n" +
563 " return { x: super.foo }" +
564 "\n }\n" +
565 "})");
566 }
567 assertEquals(1, ext("let x; [x = super()] = []").x);
568 assertEquals(1, ext("let x, y; [y] = [x = super()] = []").x);
569 assertEquals(1, ext("let x; [x] = [super()]").x);

Callers 2

parse_statementMethod · 0.50

Calls 1

evalFunction · 0.70

Tested by

no test coverage detected