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

Unified Diff: test/mjsunit/harmony/regress/regress-3930.js

Issue 974963002: Revert of Implement subclassing Arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/harmony/classes-subclass-arrays.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/regress/regress-3930.js
diff --git a/test/mjsunit/harmony/regress/regress-3930.js b/test/mjsunit/harmony/regress/regress-3930.js
new file mode 100644
index 0000000000000000000000000000000000000000..2436a2d0c38f89da1430bd25d55a6a04a8332bf5
--- /dev/null
+++ b/test/mjsunit/harmony/regress/regress-3930.js
@@ -0,0 +1,28 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-classes
+'use strict';
+
+class Stack extends Array { }
+
+assertThrows(function() { new Stack(); }, TypeError);
+
+class Stack1 extends Array {
+ constructor() { super(); }
+}
+
+assertThrows(function() { new Stack1(); }, TypeError);
+
+class Stack2 extends Array {
+ constructor() { super(1, 25); }
+}
+
+assertThrows(function() { new Stack2(); }, TypeError);
+
+let X = Array;
+
+class Stack4 extends X { }
+
+assertThrows(function() { new Stack2(); }, TypeError);
« no previous file with comments | « 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