mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 402602 - Template superclass ctor is not resolved
This commit is contained in:
parent
c055318726
commit
a5188f1c75
2 changed files with 13 additions and 1 deletions
|
@ -7599,4 +7599,15 @@ public class AST2TemplateTests extends AST2TestBase {
|
|||
BindingAssertionHelper helper = new BindingAssertionHelper(getAboveComment(), true);
|
||||
helper.assertVariableType("b", CommonTypes.int_);
|
||||
}
|
||||
|
||||
// template<typename T> struct A {
|
||||
// A(int c);
|
||||
// };
|
||||
//
|
||||
// struct B : public A<int> {
|
||||
// B(int c) : A(c) {}
|
||||
// };
|
||||
public void testTemplateBaseClassConstructorCall_402602() throws Exception {
|
||||
parseAndCheckBindings();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -348,7 +348,8 @@ public class CPPSemantics {
|
|||
&& !(binding instanceof ICPPTemplateParameter)
|
||||
&& !(lookupName instanceof ICPPASTTemplateId)) {
|
||||
ASTNodeProperty prop = lookupName.getPropertyInParent();
|
||||
if (prop != ICPPASTTemplateId.TEMPLATE_NAME && !lookupName.isQualified()) {
|
||||
if (prop != ICPPASTConstructorChainInitializer.MEMBER_ID &&
|
||||
prop != ICPPASTTemplateId.TEMPLATE_NAME && !lookupName.isQualified()) {
|
||||
// You cannot use a class template name outside of the class template scope,
|
||||
// mark it as a problem.
|
||||
IBinding user= CPPTemplates.isUsedInClassTemplateScope((ICPPClassTemplate) binding, lookupName);
|
||||
|
|
Loading…
Add table
Reference in a new issue