summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/check.cpp9
-rw-r--r--source/slang/syntax.cpp6
2 files changed, 14 insertions, 1 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>())
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 4e1778e6e..70730ff95 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -1579,7 +1579,11 @@ void Type::accept(IValVisitor* visitor, void* extra)
}
}
}
- return this;
+ RefPtr<DeclaredSubtypeWitness> rs = new DeclaredSubtypeWitness();
+ rs->sub = sub->SubstituteImpl(subst, ioDiff).As<Type>();
+ rs->sup = sup->SubstituteImpl(subst, ioDiff).As<Type>();
+ rs->declRef = declRef.SubstituteImpl(subst, ioDiff);
+ return rs;
}
String DeclaredSubtypeWitness::ToString()