summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-conformance.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-11-30 13:24:39 -0800
committerGitHub <noreply@github.com>2022-11-30 13:24:39 -0800
commit09684224d5ab63f530d66c0be65fa50e6fc5290b (patch)
tree292d0f257b3d5a5e027892a5a1e046d60166aadd /source/slang/slang-check-conformance.cpp
parentf52b4de3b29ee27213b7d60fb620a0d5d50b49f9 (diff)
Support `no_diff` on existential typed params. (#2540)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
-rw-r--r--source/slang/slang-check-conformance.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp
index d2335efbf..4d983b746 100644
--- a/source/slang/slang-check-conformance.cpp
+++ b/source/slang/slang-check-conformance.cpp
@@ -87,8 +87,10 @@ namespace Slang
// that `subType` has been proven to be *equal*
// to `superTypeDeclRef`.
//
- SLANG_UNEXPECTED("reflexive type witness");
- UNREACHABLE_RETURN(nullptr);
+ auto witness = m_astBuilder->create<TypeEqualityWitness>();
+ witness->sub = subType;
+ witness->sup = subType;
+ return witness;
}
// We might have one or more steps in the breadcrumb trail, e.g.: