summaryrefslogtreecommitdiffstats
path: root/source/slang/check.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-08 11:09:17 -0500
committerYong He <yonghe@outlook.com>2017-11-08 11:09:17 -0500
commitef19b423b46bed4739a1e86a26cfbb18c221d497 (patch)
treeaf3e11110c2986a499b405afd07ef24f061c52f8 /source/slang/check.cpp
parente1710807292544775dc6a0eb338af081fb94493e (diff)
Cleanup of "suport generic interface method".
Add a GenericValueParamDecl case in doesGenericSignatureMatchRequirement() Return a substituted DeclaredSubtypeWitness in DeclaredSubtypeWitness::SubstituteImpl() instead of return this.
Diffstat (limited to 'source/slang/check.cpp')
-rw-r--r--source/slang/check.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index 320b22bdb..233a82eef 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -1609,6 +1609,15 @@ namespace Slang
else
return false;
}
+ else if (auto genValMbr = genMbr.As<GenericValueParamDecl>())
+ {
+ if (auto requiredGenValMbr = requiredGenMbr.As<GenericValueParamDecl>())
+ {
+ return genValMbr->type->Equals(requiredGenValMbr->type);
+ }
+ else
+ return false;
+ }
else if (auto genTypeConstraintMbr = genMbr.As<GenericTypeConstraintDecl>())
{
if (auto requiredTypeConstraintMbr = requiredGenMbr.As<GenericTypeConstraintDecl>())