Fix addressing mode rules for match in statements

This commit is contained in:
Ginger Bill
2017-04-13 22:42:36 +01:00
parent d8d22e34dd
commit 0d2dbee84e
4 changed files with 26 additions and 3 deletions
+3
View File
@@ -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;
}