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.

Bug 257509

Summary: Incorrect Highlighting of Chained Object
Product: javascript Reporter: Zon
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description Zon 2016-01-11 06:39:32 UTC
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
Comment 1 Zon 2016-01-11 06:39:38 UTC
Created attachment 158081 [details]
IDE log
Comment 2 Jiri Prox 2016-01-14 14:17:40 UTC
What language is used in the sample code? Javascript? Unfortunately it is not clear from the example.
Comment 3 Zon 2016-01-15 04:08:37 UTC
Javascript of course.
Comment 4 Petr Pisl 2016-07-19 15:09:58 UTC
Improved in web-main. Now when the field is not declared, then still have green color.
Comment 5 Quality Engineering 2016-07-20 01:51:33 UTC
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