mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-13 06:43:35 +00:00
Fix constant indexing within a call that doesn't exist
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user