mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-04 17:54:39 +00:00
Fix #3955
This commit is contained in:
@@ -3670,6 +3670,11 @@ gb_internal bool check_transmute(CheckerContext *c, Ast *node, Operand *o, Type
|
||||
}
|
||||
|
||||
gb_internal bool check_binary_array_expr(CheckerContext *c, Token op, Operand *x, Operand *y) {
|
||||
if (is_type_array_like(x->type) || is_type_array_like(y->type)) {
|
||||
if (op.kind == Token_CmpAnd || op.kind == Token_CmpOr) {
|
||||
error(op, "Array programming is not allowed with the operator '%.*s'", LIT(op.string));
|
||||
}
|
||||
}
|
||||
if (is_type_array(x->type) && !is_type_array(y->type)) {
|
||||
if (check_is_assignable_to(c, y, x->type)) {
|
||||
if (check_binary_op(c, x, op)) {
|
||||
|
||||
Reference in New Issue
Block a user