Menu

#440 Wrong CodeCompletion or Parsing

open
nobody
None
5
2012-09-26
2004-11-16
Peter
No

I have different structures with same membernames
(these members are actually also structures). When I
want to access such a member, it displays the variable
names from all structs with the same name.

To reproduce it, paste the following content into Dev-
C++, place the cursor behind the last dot of Pad_1.Held.
and then press CTRL+SPACE to popup CodeCompletion:

[code]

include <stdio.h>

typedef struct
{
int A,B;
int Left,Right,Up,Down;
int L,R;
}TButtons;

typedef struct
{
TButtons Held;
TButtons Pressed;
}TPad;

typedef struct
{
int A,B;
int Left,Right,Up,Down;
int L,R;
}TFooBarButtons;

typedef struct
{
TFooBarButtons Held;
TFooBarButtons Pressed;
}TFooBarPad;

TPad Pad_1;
TFooBarPad Pad_2;

int main()
{
// Place Cursor behing last dot and hit CTRL+SPACE
// to trigger codecompletion. Then it shows everything
twice
Pad_1.Held.
}
[/code]

It should only display A,B,Left etc once, but it is
displayed twice in this case!

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.