| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-sloppy | |
| 6 | |
| 7 | 5 |
| 8 (function testConstructClassStrict() { | 6 (function testConstructClassStrict() { |
| 9 "use strict"; | 7 "use strict"; |
| 10 class Base { | 8 class Base { |
| 11 constructor(...args) { | 9 constructor(...args) { |
| 12 this.baseArgs = args; | 10 this.baseArgs = args; |
| 13 } | 11 } |
| 14 method() { return this.baseArgs; } | 12 method() { return this.baseArgs; } |
| 15 } | 13 } |
| 16 | 14 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 assertEquals([1, 2, 3], c.baseArgs); | 81 assertEquals([1, 2, 3], c.baseArgs); |
| 84 assertEquals([1, 2, 3], c.childArgs); | 82 assertEquals([1, 2, 3], c.childArgs); |
| 85 | 83 |
| 86 c = new Child2(...[1, 2, 3]); | 84 c = new Child2(...[1, 2, 3]); |
| 87 assertInstanceof(c, Child2); | 85 assertInstanceof(c, Child2); |
| 88 assertInstanceof(c, Base); | 86 assertInstanceof(c, Base); |
| 89 assertEquals(["extra", 1, 2, 3], c.method()); | 87 assertEquals(["extra", 1, 2, 3], c.method()); |
| 90 assertEquals(["extra", 1, 2, 3], c.baseArgs); | 88 assertEquals(["extra", 1, 2, 3], c.baseArgs); |
| 91 assertEquals([1, 2, 3], c.childArgs); | 89 assertEquals([1, 2, 3], c.childArgs); |
| 92 })(); | 90 })(); |
| OLD | NEW |