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.
Summary: |
False positive 'The global variable "xxx" is not declared.' for "obj[id] = xxx = [];" |
Product: |
javascript
|
Reporter: |
NukemBy |
Component: |
Editor | Assignee: |
Petr Pisl <ppisl> |
Status: |
RESOLVED
FIXED
|
|
|
Severity: |
normal
|
|
|
Priority: |
P3
|
|
|
Version: |
8.1 | |
|
Hardware: |
PC | |
|
OS: |
Windows XP | |
|
Issue Type:
|
DEFECT
|
Exception Reporter:
|
|
Attachments: |
screenshot
|
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).