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 257436 - Wrongly marked unused variable
Summary: Wrongly marked unused variable
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-06 10:58 UTC by Ondrej Brejla
Modified: 2016-01-06 13:11 UTC (History)
0 users

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 Ondrej Brejla 2016-01-06 10:58:35 UTC
Snippet:

---------
var foo = bar || function ($row) {
    return baz($row);
};
---------

And "$row" is marked as unused. The problem is that the function is in expression, this works well:

---------
var foo = function ($row) {
    return baz($row);
};
---------

Thanks!

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17
Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17
System: Linux version 3.13.0-74-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Petr Pisl 2016-01-06 13:11:31 UTC
This is already work on ecma6_dev branch. Marking as fixed. Added test for it. 
http://hg.netbeans.org/web-main/rev/a346c3ef8e57