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 121154 - [60cat] CC for array and array element should offer the same items
Summary: [60cat] CC for array and array element should offer the same items
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2007-11-05 09:22 UTC by Martin Schovanek
Modified: 2014-01-16 10:29 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Different CC lists for x and x[0] (43.07 KB, image/png)
2008-06-18 14:47 UTC, polan

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2007-11-05 09:22:20 UTC
[#200711041200, jdk1.5.0]

to reproduce:
1) have .js like:
var x = new Array(2);
ERROR: CC for 'x.|' and 'x[0].|' offers different items
Comment 1 Daniel Prusa 2007-11-05 10:33:07 UTC
Comment 2 Jiri Kovalsky 2007-11-05 11:56:22 UTC
This issue originated in NetCAT 6.0 program.
Comment 3 Petr Jiricka 2008-02-25 22:46:29 UTC
Fixed in build 682 of NetBeans 6.1.
Comment 4 polan 2008-06-18 14:26:36 UTC
[Build 200806180005, JDK 1.6.0]

CC for 'x.|' and 'x[0].|' still offers different list of possibilities - see attached image.

Or is that a feature?

Comment 5 polan 2008-06-18 14:47:20 UTC
Created attachment 62998 [details]
Different CC lists for x and x[0]
Comment 6 Marek Fukala 2009-04-20 15:44:35 UTC
The array object offers properly Array object type items.

The array element offers just default Object items.

It is impossible to identify the type of the element since it can be defined by some other expression depending on
runtime environment. I admit the type analysis can be done if the index is defined by a number or by a simple expression
and the assignment as well, but this doesn't sound like a bug to me.