summaryrefslogtreecommitdiff
path: root/source/slang/slang-lookup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-lookup.cpp')
-rw-r--r--source/slang/slang-lookup.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-lookup.cpp b/source/slang/slang-lookup.cpp
index 9c8b2fa0b..5e30e3ce9 100644
--- a/source/slang/slang-lookup.cpp
+++ b/source/slang/slang-lookup.cpp
@@ -862,6 +862,13 @@ static void _lookUpInScopes(
//
thisParameterMode = LookupResultItem::Breadcrumb::ThisParameterMode::MutableValue;
}
+ else if (funcDeclRef.getDecl()->hasModifier<RefAttribute>())
+ {
+ // In a non-`static` method marked `[ref]` there is
+ // an implicit `this` parameter that is mutable.
+ //
+ thisParameterMode = LookupResultItem::Breadcrumb::ThisParameterMode::MutableValue;
+ }
else
{
// In all other cases, there is an implicit `this` parameter