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.
Created attachment 153731 [details] screenshot One more case for "The global variable "xxx" is not declared." - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var MyLib = new function MyLib() { var _events; this.on = _on; function _on(evtId, handler) { var handlers = _events[evtId]; if( !handlers ) _events[evtId] = handlers = []; // <-- related line return handlers.push(handler); // <-- here }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning disappears when double assignment in previous line is changed to single. See screenshot for details. Occurs in NetBeans IDE Dev (Build 201505170001).
Fixed in web-main. Caused by wrong handling creating new Array objects.
Integrated into 'main-silver', will be available in build *201505220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/cf98fcbc5fe3 User: Petr Pisl <ppisl@netbeans.org> Log: #252469 - False positive 'The global variable "xxx" is not declared.' for "obj[id] = xxx = [];"