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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index 88d95f04e..75fd5177e 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -2073,7 +2073,7 @@ namespace Slang
// Replace the expression. This should make this situation easier to detect.
expr->arguments[pp] = lValueImplicitCast;
}
- else
+ else if (!as<ErrorType>(argExpr->type))
{
getSink()->diagnose(
argExpr,
@@ -2102,11 +2102,10 @@ namespace Slang
// Fall back, in case there are other reasons...
diagnostic = &Diagnostics::implicitCastUsedAsLValue;
}
-
getSink()->diagnoseWithoutSourceView(
argExpr,
*diagnostic,
- implicitCastExpr->arguments[pp]->type,
+ implicitCastExpr->arguments[0]->type,
implicitCastExpr->type);
}