aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-13 22:42:36 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-13 22:42:36 +0100
commit0d2dbee84e937ccf411787f9dda72e541db3fd20 (patch)
treea0f8853f682e46161c38273c727896b1f998ade6 /src/check_expr.c
parentd8d22e34dd63547cb6492e8e15b55fcaec4cb3e5 (diff)
Fix addressing mode rules for `match in` statements
Diffstat (limited to 'src/check_expr.c')
-rw-r--r--src/check_expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.c b/src/check_expr.c
index e1423073b..24ac6dfc1 100644
--- a/src/check_expr.c
+++ b/src/check_expr.c
@@ -1142,6 +1142,9 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
return e;
}
o->mode = Addressing_Variable;
+ if (e->flags & EntityFlag_Value) {
+ o->mode = Addressing_Value;
+ }
if (e->Variable.is_immutable) {
o->mode = Addressing_Immutable;
}