From 583b8dadc0222d344d8c38d95eb651531f8a75be Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Tue, 1 Jan 2008 02:00:39 +0000 Subject: [PATCH] Test case for bug 214017. --- .../tests/IndexCPPTemplateResolutionTest.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) 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 d65e6ca8d6a..2a5e4b6f252 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 @@ -829,4 +829,43 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa assertInstance(b1, ICPPTemplateDefinition.class); assertInstance(b1, ICPPClassType.class); } + + // template + // class Allocator { + // public: + // typedef _Tp& alloc_reference; + // template + // struct rebind { + // typedef Allocator<_Tp1> other; + // }; + // }; + // + // template + // class VecBase { + // public: + // typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + // }; + // + // template > + // class Vec : protected VecBase<_Tp, _Alloc> { + // public: + // typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference; + // reference at(int n) { + // return array[n]; + // } + // _Tp* array; + // }; + + // class A { + // public: void m() {} + // }; + // + // void main() { + // Vec a; + // a.at(0).m(); + // } + public void _testRebindPattern_214017() throws Exception { + IBinding b0= getBindingFromASTName("m();", 1); + assertInstance(b0, ICPPMethod.class); + } }