OLD | NEW |
| (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); | |
OLD | NEW |