1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 259871. Fix and test case.

This commit is contained in:
Sergey Prigogin 2009-01-02 20:53:45 +00:00
parent b6d210918b
commit f9c0ac30d7
2 changed files with 22 additions and 0 deletions

View file

@ -3532,4 +3532,24 @@ public class AST2TemplateTests extends AST2BaseTest {
b= bh.assertNonProblem("F();", 1);
assertTrue(b instanceof IType);
}
// template <typename Val>
// struct A {
// typedef const Val value;
// };
//
// template<typename T>
// struct B {
// typedef typename T::value& reference;
// };
//
// void func(int a);
//
// void test(B<A<int> >::reference p) {
// func(p);
// }
public void testTypedefReference_259871() throws Exception {
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
bh.assertNonProblem("func(p)", 4, ICPPFunction.class);
}
}

View file

@ -512,6 +512,8 @@ public class Conversions {
if (source instanceof ICPPReferenceType) {
source= ((ICPPReferenceType) source).getType();
while (source instanceof ITypedef)
source = ((ITypedef) source).getType();
}
if (target instanceof ICPPReferenceType) {
target= ((ICPPReferenceType) target).getType();