From 87a19bbe3752908fcf1306ce9879650f5719c34c Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 1 Feb 2009 01:35:28 +0000 Subject: [PATCH] Test case for bug 263158. --- .../cdt/core/parser/tests/ast2/AST2CPPTests.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java index fd71999d17b..81608afd03b 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java @@ -6433,7 +6433,7 @@ public class AST2CPPTests extends AST2BaseTest { ITypedef s2= (ITypedef) ((IPointerType) d.getType()).getType(); assertInstance(((IFunctionType) s2.getType()).getParameterTypes()[0], IBasicType.class); } - + // namespace A { // class X { // friend void f(int); @@ -6617,4 +6617,17 @@ public class AST2CPPTests extends AST2BaseTest { BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true); ba.assertProblem("a =", 1); } + + // struct A {}; + // + // void foo() { + // while ( + // A* a = 0 + // ); + // } + public void _testAmbiguityResolutionInCondition_263158() throws Exception { + BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true); + ba.assertNonProblem("A*", 1, ICPPClassType.class); + ba.assertNonProblem("a", 1, ICPPVariable.class); + } }