Debian Codegraph @

js/src/tests/test262/language/expressions/new.target/value-via-call.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-function-calls-runtime-semantics-evaluation
5 es6id: 12.3.4.1
6 description: Value when invoked via CallExpression
7 info: |
8 CallExpression : MemberExpressionArguments
9
10 [...]
11 8. Return ? EvaluateDirectCall(func, thisValue, Arguments, tailCall).
12 features: [new.target]
13 ---*/
14
15 var newTarget = null;
16
17 function f() {
18 newTarget = new.target;
19 }
20
21 f();
22
23 assert.sameValue(newTarget, undefined);
24
25 reportCompare(0, 0);