summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-09-08 15:57:00 -0700
committerGitHub <noreply@github.com>2023-09-08 15:57:00 -0700
commit26a0b3e04689fee1ec9ec071eacd72faf1efe4eb (patch)
tree35dc68c088d42c80055de81eaa9ca691496366a7 /source/slang/slang-check-expr.cpp
parent26a7cf79526b86a3dff4084d42dde8f1a8c9ac1d (diff)
Fix attribute highlighting + language server crash. (#3198)
* Fix attribute highlighting + language server crash. * Fix wave intrinsic. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
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);
}