mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 08:15:48 +02:00
Second test case for bug 259872.
This commit is contained in:
parent
3c0fa285d6
commit
0b4d235c72
1 changed files with 26 additions and 1 deletions
|
@ -3568,7 +3568,32 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
// new A<B, int>(&B::m);
|
// new A<B, int>(&B::m);
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
public void testNestedTemplates_259872() throws Exception {
|
public void testNestedTemplates_259872_1() throws Exception {
|
||||||
|
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
|
||||||
|
bh.assertNonProblem("A<B, int>", 9, ICPPConstructor.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// template <typename CL, typename T>
|
||||||
|
// struct A {
|
||||||
|
// template<typename U> struct C {
|
||||||
|
// typedef T (U::*method1)();
|
||||||
|
// };
|
||||||
|
// template<class U> struct C<const U> {
|
||||||
|
// typedef T (U::*method1)();
|
||||||
|
// };
|
||||||
|
// typedef typename C<CL>::method1 method2;
|
||||||
|
//
|
||||||
|
// A(method2 p);
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// struct B {
|
||||||
|
// int m();
|
||||||
|
//
|
||||||
|
// void test() {
|
||||||
|
// new A<B, int>(&B::m);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
public void _testNestedTemplates_259872_2() throws Exception {
|
||||||
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
|
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
|
||||||
bh.assertNonProblem("A<B, int>", 9, ICPPConstructor.class);
|
bh.assertNonProblem("A<B, int>", 9, ICPPConstructor.class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue