summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-conversion.cpp')
-rw-r--r--source/slang/slang-check-conversion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-check-conversion.cpp b/source/slang/slang-check-conversion.cpp
index b4c5ebb4a..6290acbd9 100644
--- a/source/slang/slang-check-conversion.cpp
+++ b/source/slang/slang-check-conversion.cpp
@@ -639,6 +639,11 @@ namespace Slang
return true;
}
+ if (auto refType = as<RefType>(toType))
+ {
+ return _coerce(refType->getValueType(), outToExpr, fromType, fromExpr, outCost);
+ }
+
// If both are string types we assume they are convertable in both directions
if (as<StringTypeBase>(fromType) && as<StringTypeBase>(toType))
{