mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
Fix #3573
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user