Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java2
2 files changed, 21 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
index f71aa75949..fd7bcba9dd 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
@@ -8036,4 +8036,24 @@ public class AST2TemplateTests extends AST2TestBase {
public void testOutOfLineMethodOfPartialSpecialization_401152() throws Exception {
parseAndCheckBindings();
}
+
+ // namespace N {
+ // template <typename>
+ // struct C;
+ //
+ // template <typename T>
+ // struct C<T*> {
+ // C();
+ // void waldo();
+ // };
+ //
+ // template <typename T>
+ // C<T*>::C() {}
+ //
+ // template <typename T>
+ // void C<T*>::waldo() {}
+ // }
+ public void testMemberOfPartialSpecialization_416788() throws Exception {
+ parseAndCheckBindings();
+ }
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
index 54c580a351..1e21fcab3c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
@@ -160,7 +160,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
IScope scope= this;
IASTName[] segments= name.getNames();
try {
- for (int i= segments.length - 1; --i >= 0;) {
+ for (int i= segments.length; --i >= 0;) {
if (scope == null)
return false;
IName scopeName = scope.getScopeName();

Back to the top