diff options
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 75fd5177e..5ea897448 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -670,6 +670,8 @@ namespace Slang ThisExpr* expr = m_astBuilder->create<ThisExpr>(); expr->type.type = thisType; expr->loc = loc; + if (auto declRefExpr = as<DeclRefExpr>(originalExpr)) + expr->scope = declRefExpr->scope; // Whether or not the implicit `this` is mutable depends // on the context in which it is used, and the lookup |
