mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Improve 'cannot slice' error message
This commit is contained in:
+3
-1
@@ -8748,7 +8748,9 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type
|
|||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
gbString str = expr_to_string(o->expr);
|
gbString str = expr_to_string(o->expr);
|
||||||
error(o->expr, "Cannot slice '%s'", str);
|
gbString type_str = type_to_string(o->type);
|
||||||
|
error(o->expr, "Cannot slice '%s' of type '%s'", str, type_str);
|
||||||
|
gb_string_free(type_str);
|
||||||
gb_string_free(str);
|
gb_string_free(str);
|
||||||
o->mode = Addressing_Invalid;
|
o->mode = Addressing_Invalid;
|
||||||
o->expr = node;
|
o->expr = node;
|
||||||
|
|||||||
Reference in New Issue
Block a user