What steps will reproduce the problem?
2. Type "use strict"; all on its own line.
The "use strict"; directive is flagged as no-side-effect code, and
underlined in the js-ide code-warning color.
What is the expected output? What do you see instead?
ECMAScript-262 5th Edition "use strict"; directive should not be
incorrectly flagged as no-side-effect code (e.g., it should not be
underlined and seen as suboptimal by the js-ide rules).
What version of the product are you using? On what operating system?
js2.el Version: 20080616
GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-09-05 on vernadsky, modified by Ubuntu
Linux vr2dev02 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009
Please provide any additional information below.
From the above specification, note that 'use strict' must appear as a
single statement only (which js2-mode flags as no-side-effect code):
14.1 Directive Prologues and the Use Strict Directive
A Directive Prologue is the longest sequence of ExpressionStatement
productions occurring as the initial SourceElement productions of a Program
or FunctionBody and where each ExpressionStatement in the sequence consists
entirely of a StringLiteral token followed a semicolon. The semicolon may
appear explicitly or may be inserted by automatic semicolon insertion. A
Directive Prologue may be an empty sequence.
A Use Strict Directive is an ExpressionStatement in a Directive Prologue
whose StringLiteral is either the exact character sequences "use strict" or
'use strict'. A Use Strict Directive may not contain an EscapeSequence or
A Directive Prologue may contain more than one Use Strict Directive.
However, an implementation may issue a warning if this occurs.