{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/regenerator/issues/185","labels_url":"https://api.github.com/repos/facebook/regenerator/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/facebook/regenerator/issues/185/comments","events_url":"https://api.github.com/repos/facebook/regenerator/issues/185/events","html_url":"https://github.com/facebook/regenerator/issues/185","id":62916091,"number":185,"title":"Iteration closing with `throw` on delegated yield","user":{"login":"zloirock","id":2213682,"avatar_url":"https://avatars.githubusercontent.com/u/2213682?v=3","gravatar_id":"","url":"https://api.github.com/users/zloirock","html_url":"https://github.com/zloirock","followers_url":"https://api.github.com/users/zloirock/followers","following_url":"https://api.github.com/users/zloirock/following{/other_user}","gists_url":"https://api.github.com/users/zloirock/gists{/gist_id}","starred_url":"https://api.github.com/users/zloirock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zloirock/subscriptions","organizations_url":"https://api.github.com/users/zloirock/orgs","repos_url":"https://api.github.com/users/zloirock/repos","events_url":"https://api.github.com/users/zloirock/events{/privacy}","received_events_url":"https://api.github.com/users/zloirock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-19T08:28:26Z","updated_at":"2015-03-29T02:20:23Z","closed_at":"2015-03-24T02:35:06Z","body":"[14.4.14 Runtime Semantics: Evaluation -> YieldExpression : yield * AssignmentExpression -> 6 b iii - iv](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-generator-function-definitions-runtime-semantics-evaluation)\r\n> If iterator does not have a throw method, this throw is going to terminate the yield* loop. But first we need to give iterator a chance to clean up.\r\n\r\n[Demo](http://goo.gl/cgpwd9):\r\n```js\r\nvar iter = [null, null, null].values();\r\n//iter.throw = function(){\r\n//  console.log('throw');\r\n//  return {done: true};\r\n//};\r\niter.return = function(){\r\n  console.log('return');\r\n  return {done: true};\r\n}\r\nvar gen = (function*(){\r\n  try {\r\n    yield *iter;\r\n  } catch(e){}\r\n})();\r\ngen.next();\r\ngen.throw();\r\n```\r\nExpected: 'return'\r\nResult: nothing"},"comment":{"url":"https://api.github.com/repos/facebook/regenerator/issues/comments/87342125","html_url":"https://github.com/facebook/regenerator/issues/185#issuecomment-87342125","issue_url":"https://api.github.com/repos/facebook/regenerator/issues/185","id":87342125,"user":{"login":"benjamn","id":5750,"avatar_url":"https://avatars.githubusercontent.com/u/5750?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T02:20:23Z","updated_at":"2015-03-29T02:20:23Z","body":"Fixed: 99f0d26f9f2e4e217b8e9c014f69e9df373c3b64"}}