mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Fix #2624
This commit is contained in:
+1
-1
@@ -1719,7 +1719,7 @@ gb_internal bool check_unary_op(CheckerContext *c, Operand *o, Token op) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Token_Not:
|
case Token_Not:
|
||||||
if (!is_type_boolean(type)) {
|
if (!is_type_boolean(type) || is_type_array_like(o->type)) {
|
||||||
ERROR_BLOCK();
|
ERROR_BLOCK();
|
||||||
str = expr_to_string(o->expr);
|
str = expr_to_string(o->expr);
|
||||||
error(op, "Operator '%.*s' is only allowed on boolean expressions", LIT(op.string));
|
error(op, "Operator '%.*s' is only allowed on boolean expressions", LIT(op.string));
|
||||||
|
|||||||
Reference in New Issue
Block a user