Index: test/mjsunit/harmony/rest-params.js |
diff --git a/test/mjsunit/harmony/rest-params.js b/test/mjsunit/harmony/rest-params.js |
index 5bb258ee68ede31e86a6554f2756f00e01b4ac90..cdbf0b3520daea6e4c4944bd83a6dd28b37f94d4 100644 |
--- a/test/mjsunit/harmony/rest-params.js |
+++ b/test/mjsunit/harmony/rest-params.js |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// Flags: --harmony-rest-parameters |
+// Flags: --harmony-rest-parameters --harmony-classes |
(function testRestIndex() { |
assertEquals(5, (function(...args) { return args.length; })(1,2,3,4,5)); |
@@ -180,3 +180,18 @@ var O = { |
assertEquals([], ((...args) => args)()); |
assertEquals([1,2,3], ((...args) => args)(1,2,3)); |
})();*/ |
+ |
+ |
+(function testRestParamsWithNewTarget() { |
+ "use strict"; |
+ class Base { |
+ constructor(...a) { this.base = a; } |
Dmitry Lomov (no reviews)
2015/03/20 08:32:46
Please add tests that validate 'arguments' behavi
caitp (gmail)
2015/03/20 13:28:40
You mean, assert that the arguments elements are i
Dmitry Lomov (no reviews)
2015/03/20 13:45:14
First part is what I meant - since you indirectly
|
+ } |
+ class Child extends Base { |
+ constructor(...b) { super(1, 2, 3); this.child = b; } |
+ } |
+ |
+ var c = new Child(1, 2, 3); |
+ assertEquals([1, 2, 3], c.child); |
+ assertEquals([1, 2, 3], c.base); |
+})(); |