This commit is contained in:
gingerBill
2024-05-13 12:26:01 +01:00
parent 4eab735b13
commit d1217340f5

View File

@@ -1794,6 +1794,13 @@ gb_internal bool check_unary_op(CheckerContext *c, Operand *o, Token op) {
gb_string_free(str);
return false;
}
if (o->mode == Addressing_Type) {
gbString str = type_to_string(o->type);
error(o->expr, "Expected an expression for operator '%.*s', got type '%s'", LIT(op.string), str);
gb_string_free(str);
return false;
}
Type *type = base_type(core_array_type(o->type));
gbString str = nullptr;
switch (op.kind) {