diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-26 19:15:40 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-26 19:15:40 +0000 |
| commit | 27bd72c18a0c4ff36e8464df0232263a93a5372e (patch) | |
| tree | 6421c20b12d30f508e5f1a2f358a49aed64c9977 /src | |
| parent | 415752992f76409ed9c8561081c735000e043e1c (diff) | |
Fix constant indexing within a call that doesn't exist
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 7d2240fdf..46455aacf 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5192,6 +5192,11 @@ gb_internal ExactValue get_constant_field_single(CheckerContext *c, ExactValue v } } else { TypeAndValue index_tav = fv->field->tav; + if (index_tav.mode != Addressing_Constant) { + if (success_) *success_ = false; + if (finish_) *finish_ = true; + return empty_exact_value; + } GB_ASSERT(index_tav.mode == Addressing_Constant); ExactValue index_value = index_tav.value; if (is_type_enumerated_array(node->tav.type)) { |