From 4ad0470025da4e808c46023f9a2525febcf973a2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 23 Nov 2022 16:02:56 -0800 Subject: Fix issues around dynamic generic function and autodiff. (#2528) * Fix issues around dynamic generic function and autodiff. * Fix return type issue. * Fix type unification for generic `inout` parameter. * Fix. Co-authored-by: Yong He --- source/slang/slang-ast-type.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-ast-type.cpp') diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 76623d01c..3fcc762ec 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -1178,5 +1178,14 @@ Val* ModifiedType::_substituteImplOverride(ASTBuilder* astBuilder, SubstitutionS return substType; } +Type* removeParamDirType(Type* type) +{ + for (auto paramDirType = as(type); paramDirType;) + { + type = paramDirType->getValueType(); + paramDirType = as(type); + } + return type; +} } // namespace Slang -- cgit v1.2.3