summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
-rw-r--r--source/slang/slang-check-expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index 5ea897448..abdd89b01 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -214,11 +214,11 @@ namespace Slang
{
auto exprType = expr->type.type;
- if (auto refType = as<RefType>(exprType))
+ if (auto refType = as<RefTypeBase>(exprType))
{
auto openRef = m_astBuilder->create<OpenRefExpr>();
openRef->innerExpr = expr;
- openRef->type.isLeftValue = true;
+ openRef->type.isLeftValue = (as<RefType>(exprType) != nullptr);
openRef->type.type = refType->getValueType();
return openRef;
}