diff options
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c index 88d862bb..6616b38f 100644 --- a/typecheck.c +++ b/typecheck.c @@ -1303,6 +1303,8 @@ bool can_be_mutated(env_t *env, ast_t *ast) case FieldAccess: { auto access = Match(ast, FieldAccess); type_t *fielded_type = get_type(env, access->fielded); + if (fielded_type->tag == TableType && streq(access->field, "values")) + return false; if (fielded_type->tag == PointerType) { auto ptr = Match(fielded_type, PointerType); return !ptr->is_readonly; |
