mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 03:02:37 +00:00
Fix #2913
This commit is contained in:
@@ -2768,6 +2768,11 @@ gb_internal void check_shift(CheckerContext *c, Operand *x, Operand *y, Ast *nod
|
||||
gb_string_free(to_type);
|
||||
x->mode = Addressing_Invalid;
|
||||
}
|
||||
} else if (!is_type_integer(x->type)) {
|
||||
gbString x_str = expr_to_string(x->expr);
|
||||
error(node, "Non-integer shifted operand '%s' is not allowed", x_str);
|
||||
gb_string_free(x_str);
|
||||
x->mode = Addressing_Invalid;
|
||||
}
|
||||
// x->value = x_val;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user