diff options
Diffstat (limited to 'js/src/tests/test262/language/arguments-object/unmapped/via-params-rest.js')
-rw-r--r-- | js/src/tests/test262/language/arguments-object/unmapped/via-params-rest.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/arguments-object/unmapped/via-params-rest.js b/js/src/tests/test262/language/arguments-object/unmapped/via-params-rest.js new file mode 100644 index 0000000000..8c4dab8dcd --- /dev/null +++ b/js/src/tests/test262/language/arguments-object/unmapped/via-params-rest.js @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-functiondeclarationinstantiation +es6id: 9.2.12 +description: > + Arguments are "unmapped" when paramater list is non-simple due to "rest" + parameter +info: | + [...] + 9. Let simpleParameterList be IsSimpleParameterList of formals. + [...] + 22. If argumentsObjectNeeded is true, then + a. If strict is true or if simpleParameterList is false, then + i. Let ao be CreateUnmappedArgumentsObject(argumentsList). + [...] +---*/ + +var value; + +function rest(a, ...b) { + arguments[0] = 2; + value = a; +} + +rest(1); + +assert.sameValue(value, 1); + +reportCompare(0, 0); |