diff options
Diffstat (limited to 'source/slang/slang-check-conversion.cpp')
| -rw-r--r-- | source/slang/slang-check-conversion.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-check-conversion.cpp b/source/slang/slang-check-conversion.cpp index 61d132627..a605928e3 100644 --- a/source/slang/slang-check-conversion.cpp +++ b/source/slang/slang-check-conversion.cpp @@ -1711,6 +1711,8 @@ bool SemanticsVisitor::_coerce( } } + bool result = true; + // Conceptually, we want to treat the conversion as // possible, but report it as ambiguous if we actually // need to reify the result as an expression. @@ -1723,6 +1725,7 @@ bool SemanticsVisitor::_coerce( } *outToExpr = CreateErrorExpr(fromExpr); + result = false; } if (!cachedMethod) @@ -1734,7 +1737,7 @@ bool SemanticsVisitor::_coerce( if (outCost) *outCost = bestCost; - return true; + return result; } else if (overloadContext.bestCandidate) { |
