Chromium Code Reviews

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: . Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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..05c4a468c897300a792f675512cb72eedeefb108 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,14 @@ 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; method; } }; new C4();
arv (Not doing code reviews) 2015/03/03 15:36:28 This should be an error since method is an unresol
marja 2015/03/03 15:52:14 This was actually not testing what I thought it wa
+ let C5 = class C6 { method() { C6; method; } }; new C5();
+
+ class C7 { method1() { method1; method2; }
+ method2() { method1; method2; } };
+ new C7();
})();
« src/scopes.cc ('K') | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine