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

Unified Diff: test/mjsunit/strong/declaration-after-use.js

Issue 968263002: [strong] Fix scoping related errors for methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: code review (arv@) 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
« src/scopes.cc ('K') | « 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/strong/declaration-after-use.js
diff --git a/test/mjsunit/strong/declaration-after-use.js b/test/mjsunit/strong/declaration-after-use.js
index 0559cdeffbaad73b3846cb1da583f563bb496558..122a271ca187fb67d2bf3cf2d3c2e4f6131d3489 100644
--- a/test/mjsunit/strong/declaration-after-use.js
+++ b/test/mjsunit/strong/declaration-after-use.js
@@ -110,13 +110,10 @@ function assertThrowsHelper(code, error) {
"static a() { return 'A'; } [C.a()]() { return 'B'; } }; }",
ReferenceError);
- // TODO(marja, rossberg): More tests related to computed property names in
- // classes + recognize more errors. This one is not recognized as an error
- // yet:
- // let C = class C2 {
- // static a() { return 'A'; }
- // [C2.a()]() { return 'B'; } << C2 should not be allowed here
- // };
+ assertThrowsHelper(
+ "'use strong'; if (false) { let C = class C2 { " +
+ "static a() { return 'A'; } [C2.a()]() { return 'B'; } }; }",
+ ReferenceError);
})();
@@ -180,10 +177,10 @@ function assertThrowsHelper(code, error) {
eval("var7;");
})();
- // https://code.google.com/p/v8/issues/detail?id=3927
- // class C1 { constructor() { C1; } }; new C1();
- // let C2 = class C3 { constructor() { C3; } }; new C2();
- // class C4 { method() { C4; method; } }; new C4();
- // let C5 = class C6 { method() { C6; method; } }; new C5();
+ class C1 { constructor() { C1; } }; new C1();
+ let C2 = class C3 { constructor() { C3; } }; new C2();
+
+ class C4 { method() { C4; } }; new C4();
rossberg 2015/03/04 10:39:27 PErhaps add a third test using a static method.
marja 2015/03/04 11:14:38 Done.
+ let C5 = class C6 { method() { C6; } }; new C5();
})();
« src/scopes.cc ('K') | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698