mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-09 11:33:20 +02:00
Bug 511653 - Completion of inheriting constructor in using-declaration
Change-Id: If20d85bd6199e8f08152f3a5801bfb30b61d1d09
This commit is contained in:
parent
c0ba7f6bfb
commit
2e1f2d475a
2 changed files with 12 additions and 1 deletions
|
@ -314,8 +314,9 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
|||
ICPPClassType classQualifier = getClassQualifier();
|
||||
if (classQualifier != null) {
|
||||
final boolean isDeclaration = getParent().getParent() instanceof IASTSimpleDeclaration;
|
||||
final boolean isUsingDecl = getParent() instanceof ICPPASTUsingDeclaration;
|
||||
List<IBinding> filtered = filterClassScopeBindings(classQualifier, bindings, isDeclaration);
|
||||
if (isDeclaration && nameMatches(classQualifier.getNameCharArray(),
|
||||
if ((isDeclaration || isUsingDecl) && nameMatches(classQualifier.getNameCharArray(),
|
||||
n.getLookupKey(), isPrefix)) {
|
||||
ICPPConstructor[] constructors = ClassTypeHelper.getConstructors(classQualifier, n);
|
||||
for (int i = 0; i < constructors.length; i++) {
|
||||
|
|
|
@ -1868,4 +1868,14 @@ public class CompletionTests extends CompletionTestBase {
|
|||
public void testExistingParens_72391() throws Exception {
|
||||
assertCompletionResults(new String[] { "waldo" }); // expect no parens in replacement
|
||||
}
|
||||
|
||||
// struct A{
|
||||
// A(int,int);
|
||||
// };
|
||||
// struct B: A{
|
||||
// using A::/*cursor*/
|
||||
// };
|
||||
public void testInheritingConstructor_511653() throws Exception {
|
||||
assertCompletionResults(new String[] { "A;" });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue