aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-20 16:20:41 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-20 16:20:41 -0400
commit3c4f477b845ac6b462547da820f4550faf3cbb7c (patch)
tree94dab5450939efe133e2b9573f33d1f2069eb093 /typecheck.c
parent5b945d8fc6b644e1b6a3704d8791c7f5960c1dcb (diff)
Bugfix some copy-on-write cases for when pointers are automatically
derefenced for method calls
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c
index 942c981b..43be2b97 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -1347,7 +1347,7 @@ bool can_be_mutated(env_t *env, ast_t *ast)
auto ptr = Match(indexed_type, PointerType);
return !ptr->is_readonly;
}
- return false;
+ return can_be_mutated(env, index->indexed);
}
default: return false;
}