From 1771b61eadb5d6520ab03ac60eb398b34fd699f6 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Tue, 8 Sep 2026 15:07:54 +0200 Subject: [PATCH] Fix ICE --- src/check_expr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 94ea8dbd2..35666bf5a 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5930,7 +5930,10 @@ gb_internal Entity *check_entity_from_ident_or_selector(CheckerContext *c, Ast * if (entity->kind == Entity_ProcGroup) { return entity; } - GB_ASSERT_MSG(entity->type != nullptr, "%.*s (%.*s)", LIT(entity->token.string), LIT(entity_strings[entity->kind])); + // GB_ASSERT_MSG(entity->type != nullptr, "%.*s (%.*s)", LIT(entity->token.string), LIT(entity_strings[entity->kind])); + if (entity->type == nullptr) { + return nullptr; + } } } @@ -6061,7 +6064,10 @@ gb_internal Entity *check_selector(CheckerContext *c, Operand *operand, Ast *nod add_type_and_value(c, operand->expr, operand->mode, operand->type, operand->value); return entity; } - GB_ASSERT_MSG(entity->type != nullptr, "%.*s (%.*s)", LIT(entity->token.string), LIT(entity_strings[entity->kind])); + // GB_ASSERT_MSG(entity->type != nullptr, "%.*s (%.*s)", LIT(entity->token.string), LIT(entity_strings[entity->kind])); + if (entity->type == nullptr) { + return nullptr; + } } }