On Apr 25, 2014, at 9:44 AM, Rick Waldron wrote: > > > > On Fri, Apr 25, 2014 at 12:10 PM, Allen Wirfs-Brock <[email protected]> > wrote: > > The solution "Outlawing 'yield' in a try-finally", is that _only_ for > try-finally? What about: > > function * g() { > try { > yield iWillCauseAReferenceError(); > } catch(e) { > console.log("an error happened:", e); > } > } > > var gen = g(); > gen.next(); >
That's fine and has an internally consistent semantics. Finally is the problem and only try-finally and try-catch-finally need to have a yield restriction on the try block. Allen
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

