aboutsummaryrefslogtreecommitdiffstats
path: root/src/spread/error/member-expr.template
blob: c9b330d5042ba00f0a2d089bbb3a5c523f895e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/expressions/new/spread-err-
name: >
    `new` operator
esid: sec-new-operator-runtime-semantics-evaluation
es6id: 12.3.3.1
info: |
    MemberExpression : new MemberExpression Arguments

    1. Return EvaluateNew(MemberExpression, Arguments).

    12.3.3.1.1 Runtime Semantics: EvaluateNew

    6. If arguments is empty, let argList be an empty List.
    7. Else,
       a. Let argList be ArgumentListEvaluation of arguments.
       [...]
---*/

assert.throws(/*{ error }*/, function() {
  new function(/*{ params }*/) {}(/*{ args }*/);
});