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 8cef0f38f4f..8a692679848 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 @@ -108,6 +108,50 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa assertInstance(type, IBasicType.class); assertEquals("int", ASTTypeUtil.getType(type)); } + + // template + // class Allocator; + // + // template<> + // class Allocator { + // public: + // template + // struct rebind { + // typedef Allocator<_TpRebind> other; + // }; + // }; + // + // template + // class Allocator { + // public: + // typedef _TpAllocator& alloc_reference; + // template + // struct rebind { + // typedef Allocator<_TpRebind> other; + // }; + // }; + // + // template + // class VecBase { + // public: + // typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type; + // }; + // + // template > + // class Vec : protected VecBase<_Tp, _Alloc> { + // public: + // typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference; + // }; + + // void f(Vec::reference r) {} + public void _testRebindPattern_214017_3() throws Exception { + IBinding b0= getBindingFromASTName("r)", 1); + assertInstance(b0, ICPPVariable.class); + IType type = ((ICPPVariable) b0).getType(); + type = SemanticUtil.getUltimateType(type, false); + assertInstance(type, IBasicType.class); + assertEquals("int", ASTTypeUtil.getType(type)); + } } public static class ProjectWithDepProj extends IndexCPPTemplateResolutionTest {