This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197958 - NB should ignore "use strict"
Summary: NB should ignore "use strict"
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 5 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 17:40 UTC by c089
Modified: 2012-12-18 18:03 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description c089 2011-04-21 17:40:45 UTC
Embedding the string "use strict"; in a javascript file is considered good practice (cf. Crockford 2008). While the string statement itself has no effect, browsers will use strict mode when they see it. Because of this, the "code has no side effects" warning should not be shown in this case.
Comment 1 wclark_xoom 2012-02-20 20:02:31 UTC
If bugzilla lets me, I'm changing this from "enhancement" to "defect" since it's actually not true that 'use strict'; has no side effects -- it does have side effects.  Also, this applies to all platforms, not just PC/Linux.
Comment 2 hyperthalamus 2012-04-04 13:46:54 UTC
Are there any workarounds for this?   I'm a bit new to netbeans.
Comment 3 Petr Pisl 2012-12-18 14:51:03 UTC
The warning is not shown anymore.
Comment 4 perrych2 2012-12-18 17:58:47 UTC
(In reply to comment #3)
> The warning is not shown anymore.

On what version?  I am still getting it on 7.2.1.
Comment 5 perrych2 2012-12-18 18:03:58 UTC
Ok, I see now.  See 218191.