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

Side by Side Diff: test/mjsunit/harmony/classes.js

Issue 915563003: super is only allowed in methods, accessors and constructor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use i:: to qualify function name Created 5 years, 10 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
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/object-literals-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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-classes --harmony-sloppy 5 // Flags: --harmony-classes --harmony-sloppy
6 6
7 (function TestBasics() { 7 (function TestBasics() {
8 var C = class C {} 8 var C = class C {}
9 assertEquals(typeof C, 'function'); 9 assertEquals(typeof C, 'function');
10 assertEquals(C.__proto__, Function.prototype); 10 assertEquals(C.__proto__, Function.prototype);
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 new C2(); 867 new C2();
868 868
869 class C3 extends Object { 869 class C3 extends Object {
870 constructor() { 870 constructor() {
871 ; 'use strict';;;;; 871 ; 'use strict';;;;;
872 // This is a comment. 872 // This is a comment.
873 super(); 873 super();
874 } 874 }
875 }; 875 };
876 new C3(); 876 new C3();
877
878 class C4 extends Object {
879 constructor() {
880 super(new super());
881 }
882 }; new C4();
883 }()); 877 }());
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/object-literals-super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698