summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-784080.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-784080.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-784080.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-784080.js b/deps/v8/test/mjsunit/regress/regress-784080.js
new file mode 100644
index 0000000000..83b32b678f
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-784080.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(function() {
+ function f(a, b, a) {
+ return Array.prototype.slice.call(arguments);
+ }
+ let result = f(456, 789, 111112);
+ assertEquals(result[0], 456);
+ assertEquals(result[1], 789);
+ assertEquals(result[2], 111112);
+ assertEquals(result.length, 3);
+})();
+
+(function() {
+ function f(a, b, a) {
+ return Array.prototype.slice.call(arguments);
+ }
+ let result = f(456, 789, 111112, 543, 654);
+ assertEquals(result[0], 456);
+ assertEquals(result[1], 789);
+ assertEquals(result[2], 111112);
+ assertEquals(result[3], 543);
+ assertEquals(result[4], 654);
+ assertEquals(result.length, 5);
+})();