From f9f6a28df40f418ddd0c8ff3b9cacccdb085e202 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 20 Aug 2024 20:51:57 -0700 Subject: Support dependent generic constraints. (#4870) * Support dependent generic constraints. * Fix warning. * Update comment. * Fix. * Add a test case to verify fix of #3804. * Address review. --- source/slang/slang-check-overload.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-check-overload.cpp') diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index 29cb74c23..743d518af 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -883,7 +883,8 @@ namespace Slang for( auto constraintDecl : genericDeclRef.getDecl()->getMembersOfType() ) { - DeclRef constraintDeclRef = m_astBuilder->getGenericAppDeclRef(genericDeclRef, substArgs, constraintDecl).as(); + DeclRef constraintDeclRef = m_astBuilder->getGenericAppDeclRef( + genericDeclRef, newArgs.getArrayView(), constraintDecl).as(); auto sub = getSub(m_astBuilder, constraintDeclRef); auto sup = getSup(m_astBuilder, constraintDeclRef); -- cgit v1.2.3