From 5f6822ec538fb07d81f3ef2a154a288c652fe082 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Thu, 13 Sep 2012 16:39:12 +0200 Subject: [PATCH] Bug 372587: Testcase. --- .../parser/tests/ast2/AST2TemplateTests.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) 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 697bb86045b..ee3332c3d4a 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 @@ -6008,4 +6008,27 @@ public class AST2TemplateTests extends AST2BaseTest { public void testIsPOD_367993() throws Exception { parseAndCheckBindings(getAboveComment(), CPP, true); } + + // template class A { + // public: + // static void Delegate(void* thiz) { ((T*)thiz->*M)(); } + // }; + // class B { + // public: + // void Method() {} + // }; + // class C { + // public: + // template + // void callDelegate(A& thiz) { A::Delegate(&thiz); } + // }; + // void Run() { + // C c; + // B b; + // A a; /* no error this line */ + // c.callDelegate(a); /* Invalid arguments 'Candidates are: void callDelegate(A<#0,#1> &)' */ + // } + public void testDeductionOfNonTypeTemplateArg_372587() throws Exception { + parseAndCheckBindings(getAboveComment(), CPP, true); + } }