mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
fix ClassCastException bug 74202
This commit is contained in:
parent
97fa2e884b
commit
79dfbf7c90
1 changed files with 4 additions and 6 deletions
|
@ -876,9 +876,8 @@ public class ParserSymbolTable {
|
||||||
if( origList.size() == 1 ){
|
if( origList.size() == 1 ){
|
||||||
return isValidOverload( (ISymbol)origList.get(0), newSymbol );
|
return isValidOverload( (ISymbol)origList.get(0), newSymbol );
|
||||||
} else if ( origList.size() > 1 ){
|
} else if ( origList.size() > 1 ){
|
||||||
if( newSymbol.isType( ITypeInfo.t_template ) ){
|
if( newSymbol.isType( ITypeInfo.t_template ) && newSymbol instanceof ITemplateSymbol ){
|
||||||
ITemplateSymbol template = (ITemplateSymbol) newSymbol;
|
newSymbol = ((ITemplateSymbol) newSymbol).getTemplatedSymbol();
|
||||||
newSymbol = (ISymbol) template.getContainedSymbols().get( template.getName() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//the first thing can be a class-name or enumeration name, but the rest
|
//the first thing can be a class-name or enumeration name, but the rest
|
||||||
|
@ -891,9 +890,8 @@ public class ParserSymbolTable {
|
||||||
//Iterator iter = origList.iterator();
|
//Iterator iter = origList.iterator();
|
||||||
ISymbol symbol = (ISymbol) origList.get(0);
|
ISymbol symbol = (ISymbol) origList.get(0);
|
||||||
int numSymbols = origList.size();
|
int numSymbols = origList.size();
|
||||||
if( symbol.isType( ITypeInfo.t_template ) ){
|
if( symbol.isType( ITypeInfo.t_template ) && symbol instanceof ITemplateSymbol ){
|
||||||
IParameterizedSymbol template = (IParameterizedSymbol) symbol;
|
symbol = ((ITemplateSymbol) symbol).getTemplatedSymbol();
|
||||||
symbol = (ISymbol) template.getContainedSymbols().get( template.getName() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean valid = isValidOverload( symbol, newSymbol );
|
boolean valid = isValidOverload( symbol, newSymbol );
|
||||||
|
|
Loading…
Add table
Reference in a new issue