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

Side by Side Diff: test/mjsunit/es6/super.js

Issue 1422853004: [es6] Fix Object built-in subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@weak-subclass
Patch Set: Test updated 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/classes-subclass-builtins.js ('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
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: --allow-natives-syntax 5 // Flags: --allow-natives-syntax
6 // Flags: --harmony-destructuring --harmony-rest-parameters --harmony-sloppy 6 // Flags: --harmony-destructuring --harmony-rest-parameters --harmony-sloppy
7 7
8 (function TestSuperNamedLoads() { 8 (function TestSuperNamedLoads() {
9 function Base() { } 9 function Base() { }
10 function fBase() { } 10 function fBase() { }
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 new F(); 1971 new F();
1972 assertEquals(1, calls); 1972 assertEquals(1, calls);
1973 }()); 1973 }());
1974 1974
1975 1975
1976 (function TestExtendsObject() { 1976 (function TestExtendsObject() {
1977 'use strict'; 1977 'use strict';
1978 class F extends Object { } 1978 class F extends Object { }
1979 var f = new F(42); 1979 var f = new F(42);
1980 1980
1981 // TODO(dslomov,arv): Fix this. BUG=v8:3886. 1981 assertInstanceof(f, F);
1982 assertInstanceof(f, Number); 1982 assertInstanceof(f, Object);
1983 }()); 1983 }());
1984 1984
1985 1985
1986 (function TestSuperCallErrorCases() { 1986 (function TestSuperCallErrorCases() {
1987 'use strict'; 1987 'use strict';
1988 class T extends Object { 1988 class T extends Object {
1989 constructor() { 1989 constructor() {
1990 super(); 1990 super();
1991 } 1991 }
1992 } 1992 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 } 2207 }
2208 class Derived extends Base { 2208 class Derived extends Base {
2209 constructor(x) { 2209 constructor(x) {
2210 let r = (() => super(...[x]))(); 2210 let r = (() => super(...[x]))();
2211 assertEquals(this, r); 2211 assertEquals(this, r);
2212 } 2212 }
2213 } 2213 }
2214 let d = new Derived(42); 2214 let d = new Derived(42);
2215 assertSame(42, d.x); 2215 assertSame(42, d.x);
2216 })(); 2216 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/classes-subclass-builtins.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698