From 87001dd770c71079af6e931e14b7d6995b3c63d3 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Tue, 12 Jul 2005 19:36:27 +0000 Subject: [PATCH] Fixed Bug 80171 CDT Parser doesn't understand the code when add a new static variable but with no "type" defined. Committed test case. --- .../org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java | 5 +++++ .../org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | 4 ++++ 2 files changed, 9 insertions(+) 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 280486d1ef5..5a632c1ee59 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 @@ -4971,4 +4971,9 @@ public class AST2CPPTests extends AST2BaseTest { assertSame( e, col.getName(5).resolveBinding() ); assertSame( blah, col.getName(6).resolveBinding() ); } + + public void testBug80171() throws Exception { + parseAndCheckBindings( "static var;"); //$NON-NLS-1$ + } + } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java index a6177758150..99e2454f652 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java @@ -3274,4 +3274,8 @@ public class AST2Tests extends AST2BaseTest { buffer.append("}\n"); //$NON-NLS-1$ parseAndCheckBindings( buffer.toString() ); } + + public void testBug80171() throws Exception { + parseAndCheckBindings( "static var;"); //$NON-NLS-1$ + } } \ No newline at end of file