Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: test/mjsunit/es6/spread-call-super-property.js

Issue 1429653006: Remove flags for spread calls and arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/spread-call-new-class.js ('k') | test/mjsunit/es6/super.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-spread-calls --harmony-sloppy --harmony-rest-parameters 5 // Flags: --harmony-sloppy --harmony-rest-parameters
6 6
7 (function testCallSuperPropertyStrict() { 7 (function testCallSuperPropertyStrict() {
8 "use strict"; 8 "use strict";
9 class BaseClass { 9 class BaseClass {
10 method(...args) { return [this].concat(args); } 10 method(...args) { return [this].concat(args); }
11 } 11 }
12 class SubClass extends BaseClass { 12 class SubClass extends BaseClass {
13 method(...args) { return super.method(...args); } 13 method(...args) { return super.method(...args); }
14 } 14 }
15 15
16 var c = new SubClass(); 16 var c = new SubClass();
17 assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5)); 17 assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5));
18 })(); 18 })();
19 19
20 20
21 (function testCallSuperPropertySloppy() { 21 (function testCallSuperPropertySloppy() {
22 class BaseClass { 22 class BaseClass {
23 method(...args) { return [this].concat(args); } 23 method(...args) { return [this].concat(args); }
24 } 24 }
25 class SubClass extends BaseClass { 25 class SubClass extends BaseClass {
26 method(...args) { return super.method(...args); } 26 method(...args) { return super.method(...args); }
27 } 27 }
28 28
29 var c = new SubClass(); 29 var c = new SubClass();
30 assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5)); 30 assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5));
31 })(); 31 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/spread-call-new-class.js ('k') | test/mjsunit/es6/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698