mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 16:42:33 +00:00
Minimize error propagation of map[key] indexing
This commit is contained in:
@@ -11761,11 +11761,11 @@ gb_internal ExprKind check_index_expr(CheckerContext *c, Operand *o, Ast *node,
|
||||
check_expr_with_type_hint(c, &key, ie->index, t->Map.key);
|
||||
}
|
||||
check_assignment(c, &key, t->Map.key, str_lit("map index"));
|
||||
if (key.mode == Addressing_Invalid) {
|
||||
o->mode = Addressing_Invalid;
|
||||
o->expr = node;
|
||||
return kind;
|
||||
}
|
||||
// if (key.mode == Addressing_Invalid) {
|
||||
// o->mode = Addressing_Invalid;
|
||||
// o->expr = node;
|
||||
// return kind;
|
||||
// }
|
||||
o->mode = Addressing_MapIndex;
|
||||
o->type = t->Map.value;
|
||||
o->expr = node;
|
||||
|
||||
Reference in New Issue
Block a user