summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-lower-to-ir.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 086345719..54540a3f8 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -8633,6 +8633,9 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
UInt operandCount = 0;
for (auto requirementDecl : decl->members)
{
+ if (as<GenericDecl>(requirementDecl))
+ requirementDecl = getInner(requirementDecl);
+
if (as<SubscriptDecl>(requirementDecl) || as<PropertyDecl>(requirementDecl))
{
for (auto accessorDecl : as<ContainerDecl>(requirementDecl)->members)
@@ -8782,6 +8785,13 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
auto requirementKey = getInterfaceRequirementKey(requirementDecl);
if (!requirementKey)
{
+ if (auto genericDecl = as<GenericDecl>(requirementDecl))
+ {
+ // We need to form a declref into the inner decls in case of a generic
+ // requirement.
+ requirementDecl = getInner(genericDecl);
+ }
+
if (as<PropertyDecl>(requirementDecl) || as<SubscriptDecl>(requirementDecl))
{
for (auto member : as<ContainerDecl>(requirementDecl)->members)