diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-10 18:22:37 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-10 18:22:37 +0100 |
| commit | 55f4eabecdb5282d975369ec770078ec7bd49be6 (patch) | |
| tree | 899ff90537fbb2e2446e488adb2e2e51f5abfd85 /src/check_expr.cpp | |
| parent | d0fc9aa06941f3fcd08d4c74c5c139c54be9bc81 (diff) | |
Fix map addressing mode bug
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index e3b4cd7d3..d6ef8027f 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2737,6 +2737,8 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ // Okay } else if (operand->mode == Addressing_Context) { operand->mode = Addressing_Value; // TODO(bill): Should this be Value or Immutable? + } else if (operand->mode == Addressing_MapIndex) { + operand->mode = Addressing_Value; } else if (sel.indirect || operand->mode != Addressing_Value) { operand->mode = Addressing_Variable; } else { |