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

Unified Diff: test/mjsunit/harmony/computed-property-names.js

Issue 961823002: Fix issue with class name TDZ in computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment out strong test 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 | « src/parser.cc ('k') | test/mjsunit/harmony/computed-property-names-classes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/computed-property-names.js
diff --git a/test/mjsunit/harmony/computed-property-names.js b/test/mjsunit/harmony/computed-property-names.js
index 69360771c149006cfbde1fed952a49da27fe2608..36e141116930c7d028f2bffbdadaff1bc536e994 100644
--- a/test/mjsunit/harmony/computed-property-names.js
+++ b/test/mjsunit/harmony/computed-property-names.js
@@ -277,3 +277,26 @@ function ID(x) {
assertEquals('X', object.x);
assertEquals(proto, Object.getPrototypeOf(object));
})();
+
+
+(function TestExceptionInName() {
+ function MyError() {};
+ function throwMyError() {
+ throw new MyError();
+ }
+ assertThrows(function() {
+ var o = {
+ [throwMyError()]: 42
+ };
+ }, MyError);
+ assertThrows(function() {
+ var o = {
+ get [throwMyError()]() { return 42; }
+ };
+ }, MyError);
+ assertThrows(function() {
+ var o = {
+ set [throwMyError()](_) { }
+ };
+ }, MyError);
+})();
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/harmony/computed-property-names-classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698