From 643aaa13d2c6e0c4994437aa9fba6716787608ce Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 7 Jul 2023 14:26:37 -0700 Subject: Make DeclRefBase a Val, and DeclRef a helper class. (#2967) * Make DeclRefBase a Val, and DeclRef a helper class. * Fixes. * Workaround gcc parser issue. * Revert NodeOperand change. * Fix. * Fix clang incomplete class complains. * Fix code review. * Small cleanups and improvements. --------- Co-authored-by: Yong He --- source/slang/slang-check-constraint.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/slang/slang-check-constraint.cpp') diff --git a/source/slang/slang-check-constraint.cpp b/source/slang/slang-check-constraint.cpp index 65d716db0..c38c9e7f2 100644 --- a/source/slang/slang-check-constraint.cpp +++ b/source/slang/slang-check-constraint.cpp @@ -290,7 +290,7 @@ namespace Slang if(!TryUnifyTypes(*system, getSub(m_astBuilder, constraintDeclRef), getSup(m_astBuilder, constraintDeclRef))) return SubstitutionSet(); } - SubstitutionSet resultSubst = genericDeclRef.substitutions; + SubstitutionSet resultSubst = genericDeclRef.getSubst(); // Once have built up the full list of constraints we are trying to satisfy, // we will attempt to solve for each parameter in a way that satisfies all @@ -457,7 +457,7 @@ namespace Slang // apply the substitutions we already know... GenericSubstitution* solvedSubst = m_astBuilder->getOrCreateGenericSubstitution( - genericDeclRef.getDecl(), args, genericDeclRef.substitutions.substitutions); + genericDeclRef.getDecl(), args, genericDeclRef.getSubst()); for( auto constraintDecl : genericDeclRef.getDecl()->getMembersOfType() ) { @@ -510,7 +510,7 @@ namespace Slang } resultSubst = m_astBuilder->getOrCreateGenericSubstitution( - genericDeclRef.getDecl(), args, genericDeclRef.substitutions.substitutions); + genericDeclRef.getDecl(), args, genericDeclRef.getSubst()); return resultSubst; } @@ -737,8 +737,8 @@ namespace Slang // to each declaration reference. if (!tryUnifySubstitutions( constraints, - fstDeclRef.substitutions.substitutions, - sndDeclRef.substitutions.substitutions)) + fstDeclRef.getSubst(), + sndDeclRef.getSubst())) { return false; } -- cgit v1.2.3