summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/strict-assign-arguments-element.js
blob: d2f4f1e5b8037641bf859436520b36aa787e1c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */
load(libdir + 'array-compare.js');

var obj = {};

function strictAssignArgumentsElement(a)
{
  "use strict";
  arguments[0] = 42;
  return a;
}

for (var i = 0; i < 5; i++)
{
  assertEq(strictAssignArgumentsElement(), undefined);
  assertEq(strictAssignArgumentsElement(obj), obj);
  assertEq(strictAssignArgumentsElement(17), 17);
}