| 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 |
description: Error evaluating arguments list for direct eval |
| 5 |
esid: sec-function-calls-runtime-semantics-evaluation |
| 6 |
info: | |
| 7 |
[...] |
| 8 |
3. If Type(ref) is Reference and IsPropertyReference(ref) is false and |
| 9 |
GetReferencedName(ref) is "eval", then |
| 10 |
a. If SameValue(func, %eval%) is true, then |
| 11 |
i. Let argList be ? ArgumentListEvaluation(Arguments). |
| 12 |
|
| 13 |
12.3.6.1 Runtime Semantics: ArgumentListEvaluation |
| 14 |
|
| 15 |
ArgumentList : AssignmentExpression |
| 16 |
|
| 17 |
1. Let ref be the result of evaluating AssignmentExpression. |
| 18 |
2. Let arg be ? GetValue(ref). |
| 19 |
---*/ |
| 20 |
|
| 21 |
assert.throws(ReferenceError, function() { |
| 22 |
eval(unresolvable); |
| 23 |
}); |