diff options
| author | Yong He <yonghe@outlook.com> | 2024-08-14 18:41:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 18:41:48 -0700 |
| commit | 071f1b6062b459928ebfd6f2f60a8d6ad021112b (patch) | |
| tree | 2ba65eb40f39701db6fc775a9258ec8079d161a0 /source/slang/slang-ast-decl-ref.cpp | |
| parent | 35a3d32c87f079749f6b100d01b289c3da02d7d6 (diff) | |
Variadic Generics Part 1: parsing and type checking. (#4833)
Diffstat (limited to 'source/slang/slang-ast-decl-ref.cpp')
| -rw-r--r-- | source/slang/slang-ast-decl-ref.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-ast-decl-ref.cpp b/source/slang/slang-ast-decl-ref.cpp index c9511e4e7..f3c237775 100644 --- a/source/slang/slang-ast-decl-ref.cpp +++ b/source/slang/slang-ast-decl-ref.cpp @@ -235,7 +235,7 @@ void GenericAppDeclRef::_toTextOverride(StringBuilder& out) auto genericDecl = as<GenericDecl>(getGenericDeclRef()->getDecl()); Index paramCount = 0; for (auto member : genericDecl->members) - if (as<GenericTypeParamDecl>(member) || as<GenericValueParamDecl>(member)) + if (as<GenericTypeParamDeclBase>(member) || as<GenericValueParamDecl>(member)) paramCount++; getGenericDeclRef()->toText(out); out << "<"; @@ -428,7 +428,7 @@ DeclRef<Decl> createDefaultSubstitutionsIfNeeded( SemanticsVisitor* semantics, DeclRef<Decl> declRef) { - if (declRef.as<GenericTypeParamDecl>()) + if (declRef.as<GenericTypeParamDeclBase>()) return declRef; if (declRef.as<GenericValueParamDecl>()) return declRef; |
