diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 1195974b73f..c1bcafa8798 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -5635,6 +5635,42 @@ public class AST2TemplateTests extends AST2BaseTest { parseAndCheckBindings(); } + // template + // struct A { + // typedef T type; + // }; + // + // template + // struct B {}; + // + // template > + // struct C { + // struct D { + // template + // static typename V::pointer test(typename V::pointer*); + // template + // static T* test(...); + // + // typedef typename A::type E; + // typedef decltype(test(0)) type; + // }; + // + // typedef typename D::type pointer; + // }; + // + // void f(int*); + // void f(int); + // + // void test(C::pointer a) { + // f(a); + // } + public void _testDependentExpressionsDecltype() throws Exception { + parseAndCheckBindings(); + BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), CPP); + ICPPFunction func= bh.assertNonProblem("f(a)", 1, ICPPFunction.class); + assertFalse(func instanceof ICPPUnknownBinding); + } + // template void* foo(int); // template void f(T t) { // if (T* i = foo<0>(0))