summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-06-25 19:56:39 -0700
committerYong He <yonghe@outlook.com>2020-06-25 19:56:39 -0700
commit4cf71197650ec1bf04c54783823a315cc7d477a5 (patch)
treef2273f358db06afa401334c7931f5cddba94dad0 /source
parentdd88ba1271417d0ba27b0a82194b977eee873b3d (diff)
Add a TODO comment for generic interface requirement key
Diffstat (limited to 'source')
-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;