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.
In the following code NetBeans wrongly flags `defaults` as an unused variable. export default (function(){ const Module = function () { var defaults = { prop: 'value' }; this.options = defaults; return this; }; })(); The bug disappears when I change the first line to anything other than `export default` (e.g. `export const Module` or `return const Module`). Other connected features also don't work, like renaming. A workaround is to first define a variable and then export it: const Module = (function(){ const Module = function () { var defaults = { prop: 'value' }; this.options = defaults; return this; }; })(); export default Module; Product Version: NetBeans IDE 8.2 (Build 201609300101) Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 1 Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13 Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13 System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)