summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types.c b/types.c
index 5213e9b..3e6d871 100644
--- a/types.c
+++ b/types.c
@@ -871,9 +871,9 @@ static bool types_expr(Typer *tr, Expression *e) {
*t = *of_type->ptr;
break;
case UNARY_DEL:
- if (of_type->kind != TYPE_PTR) {
+ if (of_type->kind != TYPE_PTR && of_type->kind != TYPE_SLICE) {
char *s = type_to_str(of_type);
- err_print(e->where, "Cannot delete non-pointer type %s.", s);
+ err_print(e->where, "Cannot delete non-pointer, non-slice type %s.", s);
free(s);
return false;
}