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

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

Issue 1132933003: [es6] support spread-calling Super-accessing properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months 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
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --harmony-spreadcalls --harmony-sloppy --harmony-rest-parameters
6
7 (function testCallSuperProperty() {
8 class BaseClass {
9 strict_method(...args) { "use strict"; return [this].concat(args); }
10 sloppy_method(...args) { return [this].concat(args); }
11 }
12 class SubClass extends BaseClass {
13 strict_m(...args) { return super.strict_method(...args); }
14 sloppy_m(...args) { return super.sloppy_method(...args); }
15 }
16
17 var c = new SubClass();
18 assertEquals([c, 1, 2, 3, 4, 5], c.strict_m(1, 2, 3, 4, 5));
19 assertEquals([c, 1, 2, 3, 4, 5], c.sloppy_m(1, 2, 3, 4, 5));
20 })();
OLDNEW
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698