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 ccae454a521..645cc626f6f 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 @@ -4124,8 +4124,29 @@ public class AST2TemplateTests extends AST2BaseTest { // void test(A x) { // f(x); // } - public void testInlineFriendFunction_286741() throws Exception { + public void testInlineFriendFunction_284690_1() throws Exception { final String code = getAboveComment(); parseAndCheckBindings(code, ParserLanguage.CPP); } + + // template + // struct A { + // typedef A Self; + // friend void f(Self p) {} + // }; + // template + // struct B { + // typedef B Self; + // friend void f(Self p) {} + // }; + // + // void test(A x) { + // f(x); + // } + public void _testInlineFriendFunction_284690_2() throws Exception { + final String code = getAboveComment(); + BindingAssertionHelper bh= new BindingAssertionHelper(code, true); + ICPPFunction func= bh.assertNonProblem("f(x)", 1, ICPPFunction.class); + assertFalse(func instanceof ICPPUnknownBinding); + } }