mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Trying to slice an indexable type leads to misleading error message #2958
This commit is contained in:
@@ -4848,7 +4848,7 @@ static inline bool sema_expr_analyse_slice(SemaContext *context, Expr *expr)
|
||||
|
||||
if (!inner_type || !type_is_valid_for_array(inner_type))
|
||||
{
|
||||
RETURN_SEMA_ERROR(subscripted, "Cannot index %s.", type_quoted_error_string(subscripted->type));
|
||||
RETURN_SEMA_ERROR(subscripted, "You cannot slice %s.", type_quoted_error_string(subscripted->type));
|
||||
}
|
||||
if (current_expr != subscripted)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user