summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
-rw-r--r--source/slang/slang-ast-type.cpp9
1 files changed, 9 insertions, 0 deletions
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<ParamDirectionType>(type); paramDirType;)
+ {
+ type = paramDirType->getValueType();
+ paramDirType = as<ParamDirectionType>(type);
+ }
+ return type;
+}
} // namespace Slang