diff options
Diffstat (limited to 'source/slang/slang-check-conversion.cpp')
| -rw-r--r-- | source/slang/slang-check-conversion.cpp | 5 |
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)) { |
