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

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

Issue 1414733005: [es6] Handle super properly when rewriting arrow parameter initializers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 2 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 | « src/ast-expression-visitor.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/regress/regress-4395.js
diff --git a/test/mjsunit/harmony/regress/regress-4395.js b/test/mjsunit/harmony/regress/regress-4395.js
index 09f5bfb733e0679989cda78e40d57868130c4431..fd1eb38df2a7e7871f56ffdf7d4d48067ad04a72 100644
--- a/test/mjsunit/harmony/regress/regress-4395.js
+++ b/test/mjsunit/harmony/regress/regress-4395.js
@@ -54,6 +54,7 @@
((x, [y = x]) => assertEquals(42, y))(42, []);
})();
+
(function testMultiScopeCapture() {
"use strict";
var x = 1;
@@ -67,3 +68,31 @@
})(3, 4);
}
})();
+
+
+(function testSuper() {
+ "use strict";
+ class A {
+ x() { return 42; }
+ }
+
+ class B extends A {
+ y() {
+ ((q = super.x()) => assertEquals(42, q))();
+ }
+ }
+
+ new B().y();
+
+ class C {
+ constructor() { return { prop: 42 } }
+ }
+
+ class D extends C{
+ constructor() {
+ ((q = super()) => assertEquals(42, q.prop))();
+ }
+ }
+
+ new D();
+})();
« no previous file with comments | « src/ast-expression-visitor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698