summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-val.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-07 14:26:37 -0700
committerGitHub <noreply@github.com>2023-07-07 14:26:37 -0700
commit643aaa13d2c6e0c4994437aa9fba6716787608ce (patch)
tree279794cfafecc89f0be133d2a81750d59d9ee94a /source/slang/slang-ast-val.cpp
parentfb6605c2a7bc17d3b3b79dabd07e1f05267eb33a (diff)
Make DeclRefBase a Val, and DeclRef<T> a helper class. (#2967)
* Make DeclRefBase a Val, and DeclRef<T> 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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-val.cpp')
-rw-r--r--source/slang/slang-ast-val.cpp6
1 files changed, 3 insertions, 3 deletions
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<GenericTypeConstraintDecl>(substDeclRef.decl))
+ if (auto substTypeConstraintDecl = as<GenericTypeConstraintDecl>(substDeclRef.getDecl()))
{
if (auto substAssocTypeDecl = as<AssocTypeDecl>(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<DeclaredSubtypeWitness>(
- 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;