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 code below the printIt function is most certainly used however netbeans 7.4 reports it as unused. (function(){ doStuff(); function doStuff() { var likeCake = printIt.bind(this, " likes cake"); ["mary", "erica", "abigail", "sophie"].forEach(likeCake); } function printIt(msg, s) { console.log(s + msg); } })();
It looks like that there are two objects printIt in the model. If we change the source (function(){ doStuff(); function printIt(msg, s) { console.log(s + msg); } function doStuff() { var likeCake = printIt.bind(this, " likes cake"); ["mary", "erica", "abigail", "sophie"].forEach(likeCake); } })(); that the definition is first and the usage later, then it works. So IMHO the problem is that the function definitions doesn't look for usages before the definition.
Not reproducible: Product Version: NetBeans IDE Dev (Build 20150622-3159206f97b3) Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11 Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15 System: Mac OS X version 10.10.3 running on x86_64; UTF-8; en_US (nb)