summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-11-06 14:40:38 -0800
committerGitHub <noreply@github.com>2023-11-06 14:40:38 -0800
commit46529df2c4f73a4655bdd79d48004f29374a99a8 (patch)
tree801e69e70a47ce702c055df68ada41a38158367b /source/slang/slang-check-expr.cpp
parentda9e0adb5cf2b1bed6075a3afe93cfdcceabe904 (diff)
Fix ICE when lowering an associatedtype declref from an derived interface. (#3312)
* Fix ICE when lowering an associatedtype declref from an derived interface. * Fixes. * Fix test. * Fix GLSL/SPIRV image subscript swizzle store regression. * 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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index b76fe0003..5ca0af1c9 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -581,6 +581,12 @@ namespace Slang
SourceLoc loc,
Expr* originalExpr)
{
+ if (!item.declRef)
+ {
+ originalExpr->type = QualType(m_astBuilder->getErrorType());
+ return originalExpr;
+ }
+
// We could be referencing a decl that will be synthesized. If so create a placeholder
// and return a DeclRefExpr to it.
if (auto lookupResultExpr = maybeUseSynthesizedDeclForLookupResult(item, originalExpr))