Add nullptr assert for #5875

This commit is contained in:
Jeroen van Rijn
2025-11-03 15:27:07 +01:00
parent a08f313477
commit 8a417e75b7

View File

@@ -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;
}