Index: test/mjsunit/strong/classes.js |
diff --git a/test/mjsunit/strong/classes.js b/test/mjsunit/strong/classes.js |
index d5c4560844e688b2fa335f3b63b62ab9b4dbd9ca..e33742af3fbd6373f68ac69b073e5b47a15c72d4 100644 |
--- a/test/mjsunit/strong/classes.js |
+++ b/test/mjsunit/strong/classes.js |
@@ -32,9 +32,9 @@ function constructor(body) { |
})(); |
(function NoNestedSuper() { |
- assertSyntaxError(constructor("(super())")); |
- assertSyntaxError(constructor("(() => super())(); } })")); |
- assertSyntaxError(constructor("{ super();")); |
+ assertSyntaxError(constructor("(super());")); |
+ assertSyntaxError(constructor("(() => super())();")); |
+ assertSyntaxError(constructor("{ super(); }")); |
assertSyntaxError(constructor("if (1) super();")); |
})(); |
@@ -43,4 +43,18 @@ function constructor(body) { |
assertSyntaxError(constructor("super(); super();")); |
assertSyntaxError(constructor("super(); (super());")); |
assertSyntaxError(constructor("super(); { super() }")); |
+ assertSyntaxError(constructor("super(); (() => super())();")); |
+})(); |
+ |
+(function NoReturnValue() { |
+ assertSyntaxError(constructor("return {};")); |
+ assertSyntaxError(constructor("return undefined;")); |
+ assertSyntaxError(constructor("{ return {}; }")); |
+ assertSyntaxError(constructor("if (1) return {};")); |
+})(); |
+ |
+(function NoReturnBeforeSuper() { |
+ assertSyntaxError(constructor("return; super();")); |
+ assertSyntaxError(constructor("if (0) return; super();")); |
+ assertSyntaxError(constructor("{ return; } super();")); |
})(); |