aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-11-03 15:27:07 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-11-03 15:27:07 +0100
commit8a417e75b7c6968bf0507ea5615abab4919566ea (patch)
tree17ad15d5122d4feae126d793a6727f947a540fac
parenta08f3134771ed29405378c0e6bc56cf19f646446 (diff)
Add nullptr assert for #5875
-rw-r--r--src/check_type.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index f1a2e9e22..5accfbd9f 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1633,6 +1633,8 @@ gb_internal bool is_expr_from_a_parameter(CheckerContext *ctx, Ast *expr) {
} else if (expr->kind == Ast_Ident) {
Operand x= {};
Entity *e = check_ident(ctx, &x, expr, nullptr, nullptr, true);
+ GB_ASSERT(e != nullptr);
+
if (e->flags & EntityFlag_Param) {
return true;
}