Index: test/mjsunit/harmony/generators-parsing.js |
diff --git a/test/mjsunit/harmony/generators-parsing.js b/test/mjsunit/harmony/generators-parsing.js |
index 49a44ba32dceb12ac75569bd22c348d28cb045db..941fa202c22b3b8113bf093ed2c1f6bad68f88bb 100644 |
--- a/test/mjsunit/harmony/generators-parsing.js |
+++ b/test/mjsunit/harmony/generators-parsing.js |
@@ -38,6 +38,12 @@ function* g() { (yield 3) + (yield 4); } |
// You can have a generator in strict mode. |
function* g() { "use strict"; yield 3; yield 4; } |
+// Generators can have return statements also, which internally parse to a kind |
+// of yield expression. |
+function* g() { yield 1; return; } |
+function* g() { yield 1; return 2; } |
+function* g() { yield 1; return 2; yield "dead"; } |
+ |
// Generator expression. |
(function* () { yield 3; }); |