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:
parent
b6d210918b
commit
f9c0ac30d7
2 changed files with 22 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue