mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 19:52:30 +00:00
Fix issue #244 with constant array comparisons
This commit is contained in:
@@ -1553,7 +1553,11 @@ void check_comparison(CheckerContext *c, Operand *x, Operand *y, TokenKind op) {
|
||||
} else {
|
||||
if (x->mode == Addressing_Constant &&
|
||||
y->mode == Addressing_Constant) {
|
||||
x->value = exact_value_bool(compare_exact_values(op, x->value, y->value));
|
||||
if (is_type_constant_type(x->type)) {
|
||||
x->value = exact_value_bool(compare_exact_values(op, x->value, y->value));
|
||||
} else {
|
||||
x->mode = Addressing_Value;
|
||||
}
|
||||
} else {
|
||||
x->mode = Addressing_Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user