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

Bug 368404: Testcase.

This commit is contained in:
Markus Schorn 2012-01-13 15:06:00 +01:00
parent 1467a456bd
commit 59c4d10629

View file

@ -1927,5 +1927,25 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa
public void testSpecializationInIndex_367563b() throws Exception {
getBindingFromASTName("type type", 4, ITypedef.class);
}
// template <typename T> struct remove_const_impl {};
// template <typename T> struct remove_const_impl<T*> {
// typedef T type;
// };
// template <typename T> struct remove_const_impl<const T*> {
// typedef T type;
// };
// template <typename T> struct remove_const {
// typedef typename remove_const_impl<T*>::type type;
// };
// template<typename Seq> struct foo;
// template <> struct foo<int> {
// typedef int type;
// };
// typedef foo<remove_const<const int>::type>::type t; // ERROR HERE
public void testCurrentInstanceOfClassTemplatePartialSpec_368404() throws Exception {
ITypedef tdef= getBindingFromASTName("type t;", 4, ITypedef.class);
assertEquals("int", ASTTypeUtil.getType(tdef, true));
}
}