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

Unified Diff: test/mjsunit/harmony/generators.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 | « src/parsing/parser.cc ('k') | test/mjsunit/harmony/generators-turbo.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/generators.js
diff --git a/test/mjsunit/harmony/generators.js b/test/mjsunit/harmony/generators.js
index eb4e51e9666a455dbea716701d6390ef0c88321e..895a248216081fcd56d02f84dc66a697ce3c07aa 100644
--- a/test/mjsunit/harmony/generators.js
+++ b/test/mjsunit/harmony/generators.js
@@ -648,3 +648,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 | « src/parsing/parser.cc ('k') | test/mjsunit/harmony/generators-turbo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698