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

Unified Diff: test/mjsunit/harmony/object-literals-super.js

Issue 915563003: super is only allowed in methods, accessors and constructor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use i:: to qualify function name 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.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/object-literals-super.js
diff --git a/test/mjsunit/harmony/object-literals-super.js b/test/mjsunit/harmony/object-literals-super.js
index ec22b8a8a32e9609e8893278c1327111e4afd1ad..c2d456c8774eaf155aa4060e4a25271bb98b9095 100644
--- a/test/mjsunit/harmony/object-literals-super.js
+++ b/test/mjsunit/harmony/object-literals-super.js
@@ -22,15 +22,6 @@
set accessor(v) {
super.accessor = v;
},
- property: function() {
- super.property();
- },
- propertyWithParen: (function() {
- super.property();
- }),
- propertyWithParens: ((function() {
- super.property();
- })),
methodNoSuper() {},
get getterNoSuper() {},
@@ -50,9 +41,6 @@
desc = Object.getOwnPropertyDescriptor(object, 'accessor');
assertEquals(object, desc.get[%HomeObjectSymbol()]);
assertEquals(object, desc.set[%HomeObjectSymbol()]);
- assertEquals(object, object.property[%HomeObjectSymbol()]);
- assertEquals(object, object.propertyWithParen[%HomeObjectSymbol()]);
- assertEquals(object, object.propertyWithParens[%HomeObjectSymbol()]);
assertEquals(undefined, object.methodNoSuper[%HomeObjectSymbol()]);
desc = Object.getOwnPropertyDescriptor(object, 'getterNoSuper');
@@ -118,21 +106,6 @@
})();
-(function TestMethodAsProperty() {
- var object = {
- __proto__: {
- method: function(x) {
- return 'proto' + x;
- }
- },
- method: function(x) {
- return super.method(x);
- }
- };
- assertEquals('proto42', object.method(42));
-})();
-
-
(function TestOptimized() {
// Object literals without any accessors get optimized.
var object = {
@@ -154,15 +127,7 @@
*g() {
yield super.m();
},
- g2: function*() {
- yield super.m() + 1;
- },
- g3: (function*() {
- yield super.m() + 2;
- })
};
assertEquals(42, o.g().next().value);
- assertEquals(43, o.g2().next().value);
- assertEquals(44, o.g3().next().value);
})();
« no previous file with comments | « test/mjsunit/harmony/classes.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698