From d00a93f1959181410201438e445e19923f90481a Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 17 Jan 2026 15:37:30 +0100 Subject: [PATCH] Update error on omitting end. --- src/compiler/sema_expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index bbaa48de8..1aabca649 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -4498,7 +4498,7 @@ INLINE bool sema_expr_analyse_range_internal(SemaContext *context, Range *range, { if (indexed_type->type_kind == TYPE_POINTER && type_is_any_arraylike(indexed_type->pointer)) { - RETURN_SEMA_ERROR(start, "Omitting the end index is not allowed for pointers, did you perhaps forget to dereference the pointer before slicing wih []?"); + RETURN_SEMA_ERROR(start, "Omitting the end index is not allowed for pointers, did you perhaps forget to dereference the pointer before slicing wih []? E.g. you wrote '*foo[..]' instead '(*foo)[..]'."); } RETURN_SEMA_ERROR(start, "Omitting end index is not allowed for pointers or flexible array members."); }