From 09684224d5ab63f530d66c0be65fa50e6fc5290b Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 30 Nov 2022 13:24:39 -0800 Subject: Support `no_diff` on existential typed params. (#2540) Co-authored-by: Yong He --- source/slang/slang-check-conformance.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-check-conformance.cpp') 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(); + witness->sub = subType; + witness->sup = subType; + return witness; } // We might have one or more steps in the breadcrumb trail, e.g.: -- cgit v1.2.3