summaryrefslogtreecommitdiffstats
path: root/source/slang/lookup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/lookup.cpp')
-rw-r--r--source/slang/lookup.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/lookup.cpp b/source/slang/lookup.cpp
index ccdbe8fbf..95a1b3326 100644
--- a/source/slang/lookup.cpp
+++ b/source/slang/lookup.cpp
@@ -40,6 +40,9 @@ void buildMemberDictionary(ContainerDecl* decl)
decl->memberDictionary.Clear();
decl->transparentMembers.Clear();
+ // are we a generic?
+ GenericDecl* genericDecl = dynamic_cast<GenericDecl*>(decl);
+
for (auto m : decl->Members)
{
auto name = m->getName();
@@ -56,6 +59,11 @@ void buildMemberDictionary(ContainerDecl* decl)
if (!name)
continue;
+ // Ignore the "inner" member of a generic declaration
+ if (genericDecl && m == genericDecl->inner)
+ continue;
+
+
m->nextInContainerWithSameName = nullptr;
Decl* next = nullptr;