summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-14 18:51:57 -0700
committerGitHub <noreply@github.com>2025-07-15 01:51:57 +0000
commit37143802781d8d480361d7c23202347ae3acf094 (patch)
tree300a6f60f2ddd3a0d7f14ab07665dfff5d67f31c /source/slang/slang-check-decl.cpp
parentdb06fbb163877b8823507b162ee7f2dfca8520f0 (diff)
Fix language server crash. (#7756)
* Fix language server crash. * Fix tests. * Fix. * Revert changes.
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index e67962ca3..584b1f081 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -9672,9 +9672,8 @@ void SemanticsVisitor::checkForRedeclaration(Decl* decl)
// Sanity check: there should always be a parent declaration.
//
- SLANG_ASSERT(parentDecl);
if (!parentDecl)
- return;
+ SLANG_ABORT_COMPILATION("decl has no parent.");
// If the declaration is the "inner" declaration of a generic,
// then we actually want to look one level up, because the