return when desugaring to closures
Mark S. Miller
erights at google.com
Sun Oct 12 19:10:28 PDT 2008
On Sun, Oct 12, 2008 at 5:45 PM, David-Sarah Hopwood
<david.hopwood at industrial-designers.co.uk> wrote:
> Since LabelledStatement is included in SubStatement, the following is
> allowed in the current ES3.1 draft:
>
> while (...) foo: var x = ...;
This will be corrected in the next version. But the agreed fix is not
to make LabelledStatement a Statement. The fix is to make a
LabelledStatement contain only a SubStatement. So the above will still
be rejected, but
while (...) foo: {var x = ...;}
will be fine.
--
Cheers,
--MarkM
More information about the Es-discuss
mailing list