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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/slang/lookup.cpp b/source/slang/lookup.cpp
index b01732362..86bef3f4d 100644
--- a/source/slang/lookup.cpp
+++ b/source/slang/lookup.cpp
@@ -410,9 +410,9 @@ void lookUpMemberImpl(
if (auto declRefType = type->As<DeclRefType>())
{
auto declRef = declRefType->declRef;
- if (auto assocTypeDeclRef = declRef.As<AssocTypeDecl>())
+ if (declRef.As<AssocTypeDecl>() || declRef.As<GlobalGenericParamDecl>())
{
- for (auto constraintDeclRef : getMembersOfType<GenericTypeConstraintDecl>(assocTypeDeclRef))
+ for (auto constraintDeclRef : getMembersOfType<GenericTypeConstraintDecl>(declRef.As<ContainerDecl>()))
{
// The super-type in the constraint (e.g., `Foo` in `T : Foo`)
// will tell us a type we should use for lookup.
@@ -488,5 +488,4 @@ LookupResult lookUpMember(
return result;
}
-
-}
+} \ No newline at end of file