mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 23:45:23 +02:00
Bug 140973 - Fix CCE by checking instanceof first.
This commit is contained in:
parent
cff21a926b
commit
a63dcf8935
1 changed files with 4 additions and 2 deletions
|
@ -443,12 +443,14 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements
|
||||||
public IScope getCompositeScope() {
|
public IScope getCompositeScope() {
|
||||||
if( definition == null )
|
if( definition == null )
|
||||||
checkForDefinition();
|
checkForDefinition();
|
||||||
if( definition != null ){
|
|
||||||
|
if( definition != null && definition instanceof ICPPASTCompositeTypeSpecifier ){
|
||||||
ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) definition.getParent();
|
ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) definition.getParent();
|
||||||
return compSpec.getScope();
|
return compSpec.getScope();
|
||||||
}
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Object#clone()
|
* @see java.lang.Object#clone()
|
||||||
|
|
Loading…
Add table
Reference in a new issue