summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-conformance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
-rw-r--r--source/slang/slang-check-conformance.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp
index d6e73e798..ff4a40031 100644
--- a/source/slang/slang-check-conformance.cpp
+++ b/source/slang/slang-check-conformance.cpp
@@ -237,6 +237,15 @@ namespace Slang
return false;
}
+ bool SemanticsVisitor::isValidGenericConstraintType(Type* type)
+ {
+ if (auto andType = as<AndType>(type))
+ {
+ return isValidGenericConstraintType(andType->getLeft()) && isValidGenericConstraintType(andType->getRight());
+ }
+ return isInterfaceType(type);
+ }
+
bool SemanticsVisitor::isTypeDifferentiable(Type* type)
{
return isSubtype(type, m_astBuilder->getDiffInterfaceType());