diff options
| author | gingerBill <bill@gingerbill.org> | 2021-05-21 10:51:19 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-05-21 10:51:19 +0100 |
| commit | 247f4f3293c2b5a5021062dc432f559602e12282 (patch) | |
| tree | 801a0cf29add473dbf73cffa139563efb437d85c /src/check_expr.cpp | |
| parent | 8758afdf4e5a917a996e36919071947d59af3833 (diff) | |
Fix `..=` logic in the backend
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 81fe3baa9..d714e90a8 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3392,7 +3392,7 @@ ExactValue get_constant_field_single(CheckerContext *c, ExactValue value, i32 in GB_ASSERT(bt->kind == Type_EnumeratedArray); corrected_index = index + exact_value_to_i64(bt->EnumeratedArray.min_value); } - if (op == Token_Ellipsis) { + if (op != Token_RangeHalf) { if (lo <= corrected_index && corrected_index <= hi) { TypeAndValue tav = fv->value->tav; if (success_) *success_ = true; |