Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2004-11-16 15:06:34 -0500
committerAndrew Niefer2004-11-16 15:06:34 -0500
commit8e62aa6519c64d34f38c126563b90ef8338ccebb (patch)
treee5c76ca060a98e901d77fa75d4c1b7855af4db96
parent5d1334ab11ea55c3ea56f7b23d048233e79a20b3 (diff)
downloadorg.eclipse.cdt-8e62aa6519c64d34f38c126563b90ef8338ccebb.tar.gz
org.eclipse.cdt-8e62aa6519c64d34f38c126563b90ef8338ccebb.tar.xz
org.eclipse.cdt-8e62aa6519c64d34f38c126563b90ef8338ccebb.zip
fix ClassCastException bug 74202
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ParserSymbolTable.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ParserSymbolTable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ParserSymbolTable.java
index c218f64a70..6dae20a6e3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ParserSymbolTable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/ParserSymbolTable.java
@@ -876,9 +876,8 @@ public class ParserSymbolTable {
if( origList.size() == 1 ){
return isValidOverload( (ISymbol)origList.get(0), newSymbol );
} else if ( origList.size() > 1 ){
- if( newSymbol.isType( ITypeInfo.t_template ) ){
- ITemplateSymbol template = (ITemplateSymbol) newSymbol;
- newSymbol = (ISymbol) template.getContainedSymbols().get( template.getName() );
+ if( newSymbol.isType( ITypeInfo.t_template ) && newSymbol instanceof ITemplateSymbol ){
+ newSymbol = ((ITemplateSymbol) newSymbol).getTemplatedSymbol();
}
//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();
ISymbol symbol = (ISymbol) origList.get(0);
int numSymbols = origList.size();
- if( symbol.isType( ITypeInfo.t_template ) ){
- IParameterizedSymbol template = (IParameterizedSymbol) symbol;
- symbol = (ISymbol) template.getContainedSymbols().get( template.getName() );
+ if( symbol.isType( ITypeInfo.t_template ) && symbol instanceof ITemplateSymbol ){
+ symbol = ((ITemplateSymbol) symbol).getTemplatedSymbol();
}
boolean valid = isValidOverload( symbol, newSymbol );

Back to the top