Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2005-07-08 11:21:08 -0400
committerAndrew Niefer2005-07-08 11:21:08 -0400
commit765f1256221fe5f05537a16b326284f29fa331cc (patch)
treeef22df36fac263dd2afbf1f0f9b0f1b725e37e9e
parentbe44a4b99a17f823ab43b3541846bff847b37b07 (diff)
downloadorg.eclipse.cdt-765f1256221fe5f05537a16b326284f29fa331cc.tar.gz
org.eclipse.cdt-765f1256221fe5f05537a16b326284f29fa331cc.tar.xz
org.eclipse.cdt-765f1256221fe5f05537a16b326284f29fa331cc.zip
Modified patch from Devin Steffler for bug 102731
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
index 29a762b838..9d877a71c6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
@@ -323,8 +323,11 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
*/
public ICPPClassType getClassType() {
ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) getPhysicalNode();
- return (ICPPClassType) compSpec.getName().resolveBinding();
-
+ IBinding binding = compSpec.getName().resolveBinding();
+ if (binding instanceof ICPPClassType)
+ return (ICPPClassType) binding;
+
+ return new CPPClassType.CPPClassTypeProblem( compSpec.getName(), IProblemBinding.SEMANTIC_BAD_SCOPE, compSpec.getName().toCharArray() );
}
/* (non-Javadoc)

Back to the top