From 8a417e75b7c6968bf0507ea5615abab4919566ea Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 3 Nov 2025 15:27:07 +0100 Subject: [PATCH] Add nullptr assert for #5875 --- src/check_type.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; }