summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index d18cd3bab..58f23b0c8 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -1001,6 +1001,10 @@ IRStructKey* getInterfaceRequirementKey(
IRGenContext* context,
Decl* requirementDecl)
{
+ // TODO: this special case logic can be removed if we also clean up `doesGenericSignatureMatchRequirement`
+ // Currently `doesGenericSignatureMatchRequirement` will use the inner func decl as the key
+ // in AST WitnessTable. Therefore we need to match this behavior by always using the inner
+ // decl as the requirement key.
if (auto genericDecl = as<GenericDecl>(requirementDecl))
return getInterfaceRequirementKey(context, genericDecl->inner);
IRStructKey* requirementKey = nullptr;