summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index a8cf11cdc..0d666306b 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -2709,6 +2709,10 @@ ParameterDirection getThisParamDirection(Decl* parentDecl, ParameterDirection de
{
return kParameterDirection_ConstRef;
}
+ else if (parentDecl->hasModifier<RefAttribute>())
+ {
+ return kParameterDirection_Ref;
+ }
// A `set` accessor on a property or subscript declaration
// defaults to a mutable `this` parameter, but the programmer