summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/function/param-eval-non-strict-is-correct-value.js
blob: 9ff385873a94f7f2bb0ac3ca3310dad7d7e8f369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2020 Rick Waldron.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-strict-mode-of-ecmascript
description: >
    eval allowed as formal parameter name of a non-strict function declaration
flags: [noStrict]
---*/

let exprCallCount = 0;
let evalValue = {};

function foo(eval) {
  assert.sameValue(eval, evalValue);
  exprCallCount += 1;
}

foo(evalValue);

assert.sameValue(exprCallCount, 1);

reportCompare(0, 0);