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

Unified Diff: test/mjsunit/harmony/classes.js

Issue 770843002: harmony-classes: Fix some issues with syntactic restriction on super(...). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « src/scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/classes.js
diff --git a/test/mjsunit/harmony/classes.js b/test/mjsunit/harmony/classes.js
index 5cea2a98e5901990a0f9caeb36b3e57750770768..29ffbf8d7de2ca507324bd9becb13c6734dd0c69 100644
--- a/test/mjsunit/harmony/classes.js
+++ b/test/mjsunit/harmony/classes.js
@@ -805,6 +805,28 @@ function assertAccessorDescriptor(object, name) {
assertThrows(function() {
class C {
constructor() {
+ super.method();
+ super(this);
+ }
+ }; new C();
+ }, TypeError);
+ assertThrows(function() {
+ class C {
+ constructor() {
+ super(super.method());
+ }
+ }; new C();
+ }, TypeError);
+ assertThrows(function() {
+ class C {
+ constructor() {
+ super(super());
+ }
+ }; new C();
+ }, TypeError);
+ assertThrows(function() {
+ class C {
+ constructor() {
super(1, 2, Object.getPrototypeOf(this));
}
}; new C();
@@ -848,4 +870,10 @@ function assertAccessorDescriptor(object, name) {
}
};
new C3();
+
+ class C4 extends Object {
+ constructor() {
+ super(new super());
+ }
+ }; new C4();
}());
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698