Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326750 - [c++] The name of the class can be reused for a class member
Summary: [c++] The name of the class can be reused for a class member
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.3.0   Edit
Assignee: Nathan Ridge CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords:
: 412168 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-01 04:50 EDT by Markus Schorn CLA
Modified: 2014-03-10 17:05 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Schorn CLA 2010-10-01 04:50:57 EDT
Example:

struct S {
  int S;
};
void tint(int);
void test() {
  S s;
  tint(s.S);  // Problem binidng here.
}
Comment 1 Markus Schorn CLA 2013-07-03 05:15:24 EDT
*** Bug 412168 has been marked as a duplicate of this bug. ***
Comment 2 Nathan Ridge CLA 2013-12-22 04:10:11 EST
The problem was that CPPClassScope.getBindings() was exiting early and just returning the class name if the name being looked up was equal to the class name, rather than going on to look for members with that name.

Patch: https://git.eclipse.org/r/20147
Comment 4 Marc-André Laperle CLA 2014-03-10 17:05:21 EDT
Fixed in 8.3.