diff options
Diffstat (limited to 'source/slang/slang-parser.cpp')
| -rw-r--r-- | source/slang/slang-parser.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 431cf6669..49e0704bc 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -3785,9 +3785,6 @@ static NodeBase* parseNamespaceDecl(Parser* parser, void* /*userData*/) // function `foo` has been defined), and direct member // lookup will only give us the first. // - Decl* firstDecl = nullptr; - parentDecl->getMemberDictionary().tryGetValue(nameAndLoc.name, firstDecl); - // // We will search through the declarations of the name // and find the first that is a namespace (if any). // @@ -3797,7 +3794,7 @@ static NodeBase* parseNamespaceDecl(Parser* parser, void* /*userData*/) // as possible in the parser, and we'd rather be // as permissive as possible right now. // - for (Decl* d = firstDecl; d; d = d->nextInContainerWithSameName) + for (auto d : parentDecl->getDirectMemberDeclsOfName(nameAndLoc.name)) { namespaceDecl = as<NamespaceDecl>(d); if (namespaceDecl) |
