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

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

Issue 2094253002: Fix behavior of throw on yield*. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 23913e4229a227b58be0fd63d262413c33c7a53b..902812cb5daed770bba56632810c379e30c47ca2 100644
--- a/test/mjsunit/harmony/generators-turbo.js
+++ b/test/mjsunit/harmony/generators-turbo.js
@@ -653,3 +653,15 @@ function Throw(generator, ...args) {
assertEquals({value: 42, done: false}, Next(g));
assertEquals({value: 23, done: true}, Return(g, 23));
}
+
+{
+ let iterable = {
+ [Symbol.iterator]() {
+ return { next() { return {} } };
+ }
+ };
+ let foo = function*() { yield* iterable };
+ g = foo();
+ g.next();
+ assertThrows(() => Throw(g), TypeError);
+}
« 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