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.
Example 1: result["service_capacity"] = {}; In this case "service_capacity" is highlighted violet, as global variable. Perhaps analizer detects it as an object due to right-hand initialization. Example 2: result["service_capacity"] ; In this case - as String. Problem: incorrect supposition about global scope - service_capacity could be initialized in local scope, but you can't code it as "this.service_capacity". Product Version = NetBeans IDE 8.0.2 (Build 201408251540) Operating System = Linux version 3.5.0-51-generic running on amd64 Java; VM; Vendor = 1.8.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Created attachment 158081 [details] IDE log
What language is used in the sample code? Javascript? Unfortunately it is not clear from the example.
Javascript of course.
Improved in web-main. Now when the field is not declared, then still have green color.
Integrated into 'main-silver', will be available in build *201607200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9c349254c9a5 User: Petr Pisl <ppisl@netbeans.org> Log: #257509 - Incorrect Highlighting of Chained Object