Bug 459119 - [code assist] - type assists on FieldReferences
Summary: [code assist] - type assists on FieldReferences
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-04 08:14 EST by Michael Woski CLA
Modified: 2020-09-04 15:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Woski CLA 2015-02-04 08:14:57 EST
struct A{
	struct AA{};
};

void test() {
	A a;
	a.AA  // AA does not make a whole lot of sense
}

I have a fix, but before I send it to gerrit, can anyone comment on this that there are really no use cases for this (I can't think of any, but I might be wrong)?
There are quite a few unit tests that are failing when I apply my fix. So before I go through that burden I wanted to get sure that it isn't a fruitless effort.
Comment 1 Nathan Ridge CLA 2015-02-04 11:30:40 EST
I can't think of a use case for completing the name of a nested class after a dot. That said, if you have failing tests, then looking at why they fail might highlight a use case we haven't thought of.

I *can* think of a use case for completing the name of a base class after a dot:

  struct Base {
    int waldo;
  };

  struct Derived : Base {
    int waldo;
  };

  int main() {
    Derived d;
    d.Base::waldo = 42;  // use base class name to disambiguate field
  }