summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index d9eb884f0..b991a0caf 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -925,13 +925,18 @@ FuncType* getFuncType(ASTBuilder* astBuilder, DeclRef<CallableDecl> const& declR
{
paramType = astBuilder->getErrorType();
}
+
+ // TODO(tfoley): This code should first compute the appropriate
+ // parameter-passing mode ("direction") for the `paramDecl` and
+ // then use that mode to decide which wrapper type to use.
+ //
if (paramDecl->findModifier<RefModifier>())
{
- paramType = astBuilder->getRefType(paramType);
+ paramType = astBuilder->getRefParamType(paramType);
}
else if (paramDecl->findModifier<ConstRefModifier>())
{
- paramType = astBuilder->getConstRefType(paramType);
+ paramType = astBuilder->getConstRefParamType(paramType);
}
else if (paramDecl->findModifier<OutModifier>())
{