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-ast-val.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-ast-val.cpp') diff --git a/source/slang/slang-ast-val.cpp b/source/slang/slang-ast-val.cpp index f9b668f55..6850fdbfc 100644 --- a/source/slang/slang-ast-val.cpp +++ b/source/slang/slang-ast-val.cpp @@ -317,7 +317,7 @@ Val* DeclaredSubtypeWitness::_substituteImplOverride(ASTBuilder* astBuilder, Sub // so we'll need to change this location in the code if we ever clean // up the hierarchy. // - if (auto substTypeConstraintDecl = as(substDeclRef.decl)) + if (auto substTypeConstraintDecl = as(substDeclRef.getDecl())) { if (auto substAssocTypeDecl = as(substTypeConstraintDecl->parentDecl)) { @@ -326,7 +326,7 @@ Val* DeclaredSubtypeWitness::_substituteImplOverride(ASTBuilder* astBuilder, Sub // At this point we have a constraint decl for an associated type, // and we nee to see if we are dealing with a concrete substitution // for the interface around that associated type. - if (auto thisTypeSubst = findThisTypeSubstitution(substDeclRef.substitutions, interfaceDecl)) + if (auto thisTypeSubst = findThisTypeSubstitution(substDeclRef.getSubst(), interfaceDecl)) { // We need to look up the declaration that satisfies // the requirement named by the associated type. @@ -349,7 +349,7 @@ Val* DeclaredSubtypeWitness::_substituteImplOverride(ASTBuilder* astBuilder, Sub } DeclaredSubtypeWitness* rs = astBuilder->getOrCreate( - substSub, substSup, astBuilder->getSpecializedDeclRef(substDeclRef.getDecl(), substDeclRef.substitutions.substitutions)); + substSub, substSup, astBuilder->getSpecializedDeclRef(substDeclRef.getDecl(), substDeclRef.getSubst())); rs->sub = substSub; rs->sup = substSup; rs->declRef = substDeclRef; -- cgit v1.2.3