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

Side by Side Diff: test/mjsunit/harmony/regress/regress-3930.js

Issue 975463002: Implement subclassing Arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm again Created 5 years, 9 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
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-classes
6 'use strict';
7
8 class Stack extends Array { }
9
10 assertThrows(function() { new Stack(); }, TypeError);
11
12 class Stack1 extends Array {
13 constructor() { super(); }
14 }
15
16 assertThrows(function() { new Stack1(); }, TypeError);
17
18 class Stack2 extends Array {
19 constructor() { super(1, 25); }
20 }
21
22 assertThrows(function() { new Stack2(); }, TypeError);
23
24 let X = Array;
25
26 class Stack4 extends X { }
27
28 assertThrows(function() { new Stack2(); }, TypeError);
OLDNEW
« src/runtime/runtime-array.cc ('K') | « test/mjsunit/harmony/classes-subclass-arrays.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698