From 24df5515d6c2f8537683d0e48d27a161c394e7cd Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 30 Aug 2024 16:32:34 -0700 Subject: Support extension on generic type. (#4968) --- source/slang/slang-check-conformance.cpp | 4 ++-- 1 file changed, 2 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 9a44cbbb4..ffa037996 100644 --- a/source/slang/slang-check-conformance.cpp +++ b/source/slang/slang-check-conformance.cpp @@ -60,7 +60,7 @@ namespace Slang return result; result = checkAndConstructSubtypeWitness(subType, superType, isSubTypeOptions); - if(int(isSubTypeOptions) & int(IsSubTypeOptions::NotReadyForLookup)) + if(!result && (int(isSubTypeOptions) & int(IsSubTypeOptions::NoCaching))) return result; getShared()->cacheSubtypeWitness(subType, superType, result); @@ -112,7 +112,7 @@ namespace Slang // tangling convertibility into it. // First, make sure both sub type and super type decl are ready for lookup. - if ( !(int(isSubTypeOptions) & int(IsSubTypeOptions::NotReadyForLookup)) ) + if ( !(int(isSubTypeOptions) & int(IsSubTypeOptions::NoCaching)) ) { if (auto subDeclRefType = as(subType)) { -- cgit v1.2.3