Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2012-01-13 09:06:00 -0500
committerMarkus Schorn2012-01-13 09:06:00 -0500
commit59c4d10629cf7e8567ffb9759022212654c58615 (patch)
tree45007534f5427b83689d8193da04c078692a5db8
parent1467a456bd822e30ce023b723bf21aecb98798db (diff)
downloadorg.eclipse.cdt-59c4d10629cf7e8567ffb9759022212654c58615.tar.gz
org.eclipse.cdt-59c4d10629cf7e8567ffb9759022212654c58615.tar.xz
org.eclipse.cdt-59c4d10629cf7e8567ffb9759022212654c58615.zip
Bug 368404: Testcase.
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java
index f999d7a890..5697225117 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java
@@ -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));
+ }
}

Back to the top