1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Fixed 73615 - [Parser] NullPointerException in TokenFactory#createTokenDuple

This commit is contained in:
John Camelon 2004-09-13 15:43:12 +00:00
parent 0c65449761
commit 413c618734
2 changed files with 16 additions and 0 deletions

View file

@ -2066,4 +2066,19 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
parse( "namespace { int abc; }");//$NON-NLS-1$
assertTrue( callback.problems.isEmpty() );
}
public void testBug73615() throws Exception
{
for( int i = 0; i < 2; ++i )
{
StringWriter writer = new StringWriter();
if( i == 0 )
writer.write( "class B;\n");
writer.write( "class A { A( B * ); };\n");
if( i == 0 )
parse( writer.toString() );
else
parse( writer.toString(), false );
}
}
}

View file

@ -45,6 +45,7 @@ public class TokenFactory {
public static ITokenDuple createTokenDuple( ITokenDuple firstDuple, ITokenDuple secondDuple ){
if( secondDuple == null ) return firstDuple;
if( firstDuple == null ) return secondDuple;
List [] f1 = firstDuple.getTemplateIdArgLists();
List [] f2 = secondDuple.getTemplateIdArgLists();
if( f1 == null && f2 == null )