On Mon, 18 Apr 2011 14:42:21 +0200, Jorge <[email protected]> wrote:
I understand that it would be quite interesting to get a warning/error in this case:

a= b
(c= d)();

...only that there's no ASI in this case !

... and that's actually a very relevant point.
Errors with ASI comes (in my experience) exclusively in cases where there
is a newline that was intended to end the statement, but where it actually
didn't - i.e., where ASI does not insert a semicolon.

No amount of warning about automatically inserted semicolons will help
these cases, which are indistinguishable from correctly wrapped code.

The only thing that will help is for the writer to not rely on ASI, and
therefore treat every line not ending in a semicolon as a wrapped statement.
If that wouldn't be correct, insert the semicolon manually.

/L
--
Lasse Reichstein Holst Nielsen - [email protected]
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to