mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Andrew Niefer
fix bug in PST that causes parse failure on > 2 constructors for a given class Modified ParserSymbolTableTest.testConstructors to test > 2 constructors
This commit is contained in:
parent
3cb0574d85
commit
45cfbc6cba
4 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
2003-09-03 Andrew Niefer
|
||||
Modified ParserSymbolTableTest.testConstructors to test > 2 constructors
|
||||
|
||||
2003-09-03 John Camelon
|
||||
Added testBug41445() to CompleteParseASTTests.java.
|
||||
|
||||
|
|
|
@ -2484,10 +2484,14 @@ public class ParserSymbolTableTest extends TestCase {
|
|||
IParameterizedSymbol constructor2 = table.newParameterizedSymbol( "A", TypeInfo.t_constructor );
|
||||
constructor2.addParameter( TypeInfo.t_int, 0, null, false );
|
||||
|
||||
IParameterizedSymbol constructor3 = table.newParameterizedSymbol( "A", TypeInfo.t_constructor );
|
||||
constructor3.addParameter( TypeInfo.t_char, 0, null, false );
|
||||
|
||||
classA.addConstructor( constructor1 );
|
||||
classA.addConstructor( constructor2 );
|
||||
classA.addConstructor( constructor3 );
|
||||
|
||||
assertEquals( classA.getConstructors().size(), 2 );
|
||||
assertEquals( classA.getConstructors().size(), 3 );
|
||||
|
||||
IParameterizedSymbol cloned = (IParameterizedSymbol) constructor2.clone();
|
||||
try{
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
2003-09-03 Andrew Niefer
|
||||
fix bug in PST that prevents > 2 constructors
|
||||
|
||||
2003-09-03 John Camelon
|
||||
Fixed bug41445 - QualifiedLookup succeeds where it should fail.
|
||||
|
||||
|
|
|
@ -476,7 +476,7 @@ public class ParserSymbolTable {
|
|||
//the first thing can be a class-name or enumeration name, but the rest
|
||||
//must be functions. So make sure the newDecl is a function before even
|
||||
//considering the list
|
||||
if( newSymbol.getType() != TypeInfo.t_function ){
|
||||
if( newSymbol.getType() != TypeInfo.t_function && newSymbol.getType() != TypeInfo.t_constructor ){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue