summaryrefslogtreecommitdiffstats
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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index b0af5378c..cab01d585 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -3924,7 +3924,7 @@ namespace Slang
declToModify = genericDecl->inner;
_addModifiers(declToModify, modifiers);
- if (containerDecl)
+ if (containerDecl && !as<GenericDecl>(containerDecl))
{
// Make sure the decl is properly nested inside its lexical parent
AddMember(containerDecl, decl);