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

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

Issue 1092503003: [es6] Make ParseSuperExpression uses scopes instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add commented out js test Created 5 years, 8 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
« src/preparser.h ('K') | « test/cctest/test-parsing.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/super.js
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js
index 988cef22e2fdc959d2ae7de0878a48d748d44ac6..3f748813f8ff7250187f24bb6e3c63f57a82d912 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -2053,6 +2053,7 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
assertInstanceof(f, Number);
}());
+
(function TestSuperCallErrorCases() {
'use strict';
class T extends Object {
@@ -2064,3 +2065,25 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44);
T.__proto__ = null;
assertThrows(function() { new T(); }, TypeError);
}());
+
+
+// TODO(arv): This depends on lexical this which is in progress. Enable and add
+// similar test to object-literal-super.js
+// (function TestSuperPropertyInEval() {
+// 'use strict';
+// let y = 3;
+// class Base {
+// m() { return 1; }
+// get x() { return 2; }
+// set y(v) { y = v; }
+// }
+// class Derived extends Base {
+// n() {
+// assertSame(super.x, eval('super.x'));
+// assertSame(super.m(), eval('super.m()'));
+// return eval('super.m()');
+// }
+// }
+// let d = new Derived();
+// assertSame(1, d.n());
+// })();
« src/preparser.h ('K') | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698