Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-06-11 22:57:28 +0000
committerSergey Prigogin2013-06-11 23:05:43 +0000
commit83c3e6d27fb8c846436f0d50c16ae5064e4f8249 (patch)
tree99f83ee6d18e0617c372c732b15f5cbb94df7cf9
parent7053a577c3650c8f5849d560bf9ea9bd45ba412a (diff)
downloadorg.eclipse.cdt-83c3e6d27fb8c846436f0d50c16ae5064e4f8249.tar.gz
org.eclipse.cdt-83c3e6d27fb8c846436f0d50c16ae5064e4f8249.tar.xz
org.eclipse.cdt-83c3e6d27fb8c846436f0d50c16ae5064e4f8249.zip
Bug 410519 - UnsupportedOperationException: addMember method should beCDT_8_2_0
called instead.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
index 070c5a6224d..0d40d06d37f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -106,11 +106,12 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
IScope classScope = specialized.getCompositeScope();
if (classScope == null)
return IBinding.EMPTY_BINDING_ARRAY;
-
- IBinding[] bindings= classScope.getBindings(lookup);
+
+ IBinding[] bindings= classScope.getBindings(lookup);
IBinding[] result= null;
for (IBinding binding : bindings) {
- if (binding == specialized) {
+ if (binding == specialized ||
+ (binding instanceof ICPPClassType && specialized.isSameType((IType) binding))) {
binding= specialClass;
} else {
binding= specialClass.specializeMember(binding, lookup.getLookupPoint());

Back to the top