Bug #9434 2006-11-12 21:59

kazeyoukai

Name shadowing?

Well...the other error I posted before this seems to have magically resolved itself. However, an older bug has shown up in its place.
When a local variable has the name of a class's field, no matter the scope, it ceases to show up in the code completion for objects of that class. Something like this:

class Foo {
    private:
        int x;
    public:
        Foo() {
            x = 5;
        }
        int getX() {
            return x;
        }
};
int main(void) {
    int x = 8;
    Foo b;
    b.

All the stuff EXCEPT x show up when the "." is typed. Also, this:

Foo x;
x.

Results in no code completion at all showing up. Therefore, my best guess is that it has something to do with the SmartSense not being so smart, and confusing locals with fields.
Category
Plugin::CodeCompletion
Group
 
Status
Closed
Close date
2010-10-16 01:47
Assigned to
loaden
kazeyoukai 2007-07-16 23:39

It appears to persist, yes.

loaden 2010-10-16 01:47

This bug has been already fixed in HEAD.

Thank you.