1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Fixed ClassCastException in CompleteParseASTTest.

This commit is contained in:
John Camelon 2004-06-17 17:29:12 +00:00
parent 6f1acede84
commit 67ad3bb4b0

View file

@ -516,7 +516,9 @@ public class CompleteParseBaseTest extends TestCase
protected CodeScope getCurrentCodeScope()
{
return (CodeScope)scopes.peek();
if( scopes.peek() instanceof CodeScope )
return (CodeScope)scopes.peek();
return null;
}
protected Scope popScope()
@ -714,7 +716,8 @@ public class CompleteParseBaseTest extends TestCase
*/
public void exitCodeBlock(IASTCodeScope scope) {
popScope();
getCurrentCodeScope().addNewScope(scope);
if( getCurrentCodeScope() != null )
getCurrentCodeScope().addNewScope(scope);
}
/* (non-Javadoc)