summaryrefslogtreecommitdiff
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 5554724a7..10dbe3140 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -4634,14 +4634,6 @@ static void CompleteDecl(
ContainerDecl* containerDecl,
Modifiers modifiers)
{
-
- // If this is a namespace and already added, we don't want to add to the parent
- // Or add any modifiers
- if (as<NamespaceDecl>(decl) && decl->parentDecl)
- {
- return;
- }
-
// Add any modifiers we parsed before the declaration to the list
// of modifiers on the declaration itself.
//
@@ -4699,6 +4691,13 @@ static void CompleteDecl(
}
}
+ // If this is a namespace and already added, we don't want to add to the parent
+ // Or add any modifiers
+ if (as<NamespaceDecl>(decl) && decl->parentDecl)
+ {
+ return;
+ }
+
if (!as<GenericDecl>(containerDecl))
{
// Make sure the decl is properly nested inside its lexical parent