From c8d02717aac3c3b2252f587eb57d54298ad27e65 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Thu, 15 May 2008 12:04:47 +0000 Subject: [PATCH] Fixes CompositeCPPTemplateScope.getParent(). --- .../index/composite/cpp/CompositeCPPTemplateScope.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateScope.java index 85d164b8a0a..873fcb8bd8c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateScope.java @@ -6,7 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Ferguson (Symbian) - Initial implementation + * Andrew Ferguson (Symbian) - Initial implementation + * Markus Schorn (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.core.index.composite.cpp; @@ -54,6 +55,9 @@ public class CompositeCPPTemplateScope extends CompositeScope implements ICPPTem @Override public IIndexScope getParent() { - return (IIndexScope) rbinding; + // the binding is the binding for both the composite and the template scope, so + // make sure to use the parent of the scope. + final IIndexScope templateScope= rbinding.getScope(); + return cf.getCompositeScope(templateScope.getParent()); } }