diff options
Diffstat (limited to 'source/slang/slang-ast-val.cpp')
| -rw-r--r-- | source/slang/slang-ast-val.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source/slang/slang-ast-val.cpp b/source/slang/slang-ast-val.cpp index 92e170515..40daae3a6 100644 --- a/source/slang/slang-ast-val.cpp +++ b/source/slang/slang-ast-val.cpp @@ -213,7 +213,7 @@ Val* maybeSubstituteGenericParam(Val* paramVal, Decl* paramDecl, SubstitutionSet Count argCount = args.getCount(); Count argIndex = 0; - for (auto m : outerGeneric->members) + for (auto m : outerGeneric->getDirectMemberDecls()) { // If we have run out of arguments, then we can stop // iterating over the parameters, because `this` @@ -541,17 +541,15 @@ Val* DeclaredSubtypeWitness::_substituteImplOverride( bool found = false; Index index = 0; - for (auto m : genericDecl->members) + for (auto constraintParam : + genericDecl->getDirectMemberDeclsOfType<GenericTypeConstraintDecl>()) { - if (auto constraintParam = as<GenericTypeConstraintDecl>(m)) + if (constraintParam == getDeclRef().getDecl()) { - if (constraintParam == getDeclRef().getDecl()) - { - found = true; - break; - } - index++; + found = true; + break; } + index++; } if (found) { |
