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

Unified Diff: test/mjsunit/harmony/generators-turbo.js

Issue 2100093002: Fix behavior of return on yield*. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « test/mjsunit/harmony/generators.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/generators-turbo.js
diff --git a/test/mjsunit/harmony/generators-turbo.js b/test/mjsunit/harmony/generators-turbo.js
index d12c8cffe1aae50ef5830aafe585d88d257d7ae5..23913e4229a227b58be0fd63d262413c33c7a53b 100644
--- a/test/mjsunit/harmony/generators-turbo.js
+++ b/test/mjsunit/harmony/generators-turbo.js
@@ -643,3 +643,13 @@ function Throw(generator, ...args) {
assertEquals({value: 42, done: false}, Next(g));
assertEquals({value: 42, done: false}, Next(g));
}
+
+{
+ let foo = function*() {
+ yield* (function*() { yield 42; }());
+ assertUnreachable();
+ }
+ g = foo();
+ assertEquals({value: 42, done: false}, Next(g));
+ assertEquals({value: 23, done: true}, Return(g, 23));
+}
« no previous file with comments | « test/mjsunit/harmony/generators.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698