diff options
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 75a3c2ff1..3567e2593 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -1024,6 +1024,23 @@ namespace Slang }); } } + for (auto subst = declRefType->declRef.substitutions.substitutions; subst; subst = subst->outer) + { + if (auto genSubst = as<GenericSubstitution>(subst)) + { + for (auto arg : genSubst->getArgs()) + { + if (auto typeArg = as<Type>(arg)) + { + maybeRegisterDifferentiableTypeRecursive(m_astBuilder, typeArg, workingSet); + } + } + } + else if (auto thisSubst = as<ThisTypeSubstitution>(subst)) + { + maybeRegisterDifferentiableTypeRecursive(m_astBuilder, thisSubst->witness->sub, workingSet); + } + } return; } } |
