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 244401 - Inherited protected member variables/operations highlighted as "Unable to resolve identifier"
Summary: Inherited protected member variables/operations highlighted as "Unable to res...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 10:43 UTC by Ulf_Kjeldsen
Modified: 2014-11-19 18:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans-project for demonstrating the problem (26.33 KB, application/x-zip-compressed)
2014-05-09 10:43 UTC, Ulf_Kjeldsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulf_Kjeldsen 2014-05-09 10:43:53 UTC
Created attachment 147202 [details]
NetBeans-project for demonstrating the problem

2 classes, one inheriting the other. The base-class is in global namespace and has a protected member-variable. The derived class is in another namespace and has an unnamed typedef struct. (See the attached netbeans project).

This will result in an "Unable to resolve identifier" when trying to access the protected member variable from within the *.cpp-file of the derived class (testclass.cpp in the attachment). (The project is still able to compile and run).

Same thing happens for protected member operations.

It is also not possible to navigate to the member declaration using SHIFT+left click as long as the highlight is present.

NOTE: The behavior only seems to appear if the two classes are in different namespaces at the same time as there is a presence of an unnamed struct in the derived class, meaning:

  - Naming the struct or removing the typedef -> The highlighting "Unable to resolve identifier" will disappear from the usage of the protected member in testclass.cpp. Navigation using SHIFT+click will work again.

  - Moving the two classes into the same namespace -> The highlighting "Unable to resolve identifier" will disappear from the usage of the protected member in testclass.cpp. Navigation using SHIFT+click will work again.