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

Summary: Inherited protected member variables/operations highlighted as "Unable to resolve identifier"
Product: cnd Reporter: Ulf_Kjeldsen
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: NetBeans-project for demonstrating the problem

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.