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 242973 - Incorrect navigation if struct and variable have same names
Summary: Incorrect navigation if struct and variable have same names
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: PC Solaris
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 15:59 UTC by Vladimir Kvashin
Modified: 2016-10-31 10:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2014-03-17 15:59:31 UTC
In the following code, cmdmod.browse is underlined as "unresolved". although code compiles and works.

struct cmdmod_t {
    int browse;
};

struct cmdmod_t cmdmod;

struct cmdmod {
    int other_field;
} cmdmods[] = { { 1 }, { 2 }, { 3 } };

int main(int argc, char** argv) {
    cmdmod.browse = 5; // browse is unresolved
    return cmdmod.browse; // browse is unresolved
}
Comment 1 Vladimir Kvashin 2014-03-17 16:00:32 UTC
Code completion shows "other_field" if caret position is after cmdmod.