1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Fixed 271236 and 144542.

This commit is contained in:
Sergey Prigogin 2009-04-07 14:54:10 +00:00
parent 962ee7affa
commit 1d92535285
4 changed files with 28 additions and 28 deletions

View file

@ -33,32 +33,7 @@ public class AST2CPPSpecFailingTest extends AST2SpecBaseTest {
}
public void testDummy() {} // avoids JUnit "no tests" warning
// struct B {
// virtual void f(int);
// virtual void f(char);
// void g(int);
// void h(int);
// };
// struct D : B {
// using B::f;
// void f(int); // OK: D::f(int) overrides B::f(int);
// using B::g;
// void g(char); // OK
// using B::h;
// void h(int); // OK: D::h(int) hides B::h(int)
// };
// void k(D* p)
// {
// p->f(1); //calls D::f(int)
// p->f('a'); //calls B::f(char)
// p->g(1); //calls B::g(int)
// p->g('a'); //calls D::g(char)
// }
public void _test7_3_3s12() throws Exception { // raised bug 161562 for that
parse(getAboveComment(), ParserLanguage.CPP, true, 0);
}
// template <class T> struct B { };
// template <class T> struct D : public B<T> {};
// struct D2 : public B<int> {};

View file

@ -1479,6 +1479,31 @@ public class AST2CPPSpecTest extends AST2SpecBaseTest {
parse(getAboveComment(), ParserLanguage.CPP, true, 0);
}
// struct B {
// virtual void f(int);
// virtual void f(char);
// void g(int);
// void h(int);
// };
// struct D : B {
// using B::f;
// void f(int); // OK: D::f(int) overrides B::f(int);
// using B::g;
// void g(char); // OK
// using B::h;
// void h(int); // OK: D::h(int) hides B::h(int)
// };
// void k(D* p)
// {
// p->f(1); //calls D::f(int)
// p->f('a'); //calls B::f(char)
// p->g(1); //calls B::g(int)
// p->g('a'); //calls D::g(char)
// }
public void test7_3_3s12() throws Exception { // raised bug 161562 for that
parse(getAboveComment(), ParserLanguage.CPP, true, 0);
}
// namespace A {
// int x;
// }

View file

@ -7116,7 +7116,7 @@ public class AST2CPPTests extends AST2BaseTest {
// using ns::A;
// struct A;
// A a;
public void _testForwardDeclarationAfterUsing_271236() throws Exception {
public void testForwardDeclarationAfterUsing_271236() throws Exception {
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
ba.assertNonProblem("A a;", 1, ICPPClassType.class);
}

View file

@ -178,7 +178,7 @@ abstract public class CPPScope implements ICPPScope, ICPPASTInternalScope {
}
public IBinding getBindingInAST(IASTName name, boolean forceResolve) throws DOMException {
IBinding[] bs= getBindingsInAST(name, forceResolve, false, false, false);
IBinding[] bs= getBindingsInAST(name, forceResolve, false, false, true);
return CPPSemantics.resolveAmbiguities(name, bs);
}