archives

« Bugzilla Issues Index

#1550 — `if (0) do {} while (0); else {}` prohibited in draft but allowed in consensus reality


In response to bug 157, the semicolon was removed from the production for do-while loops.

But then this IfStatement:

if (0)
do {} while (0);
else
{}

would fail to parse because of the extra semicolon; the do-while line would parse as two statements (a do-while loop followed by an EmptyStatement) rather than one.

Putting the ";" back on that production, and adding an "opt", might work.


fixed in rev 16 editor's draft

but ' back and added opt


fixed in rev16 draft. July 15, 2013