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(); |
})(); |