| 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 |
---*/ |
| 13 |
|
| 14 |
var newTarget = null; |
| 15 |
|
| 16 |
function f() { |
| 17 |
newTarget = new.target; |
| 18 |
} |
| 19 |
|
| 20 |
f(); |
| 21 |
|
| 22 |
assert.sameValue(newTarget, undefined); |