From 3c4f477b845ac6b462547da820f4550faf3cbb7c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 20 Aug 2024 16:20:41 -0400 Subject: Bugfix some copy-on-write cases for when pointers are automatically derefenced for method calls --- typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'typecheck.c') 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; } -- cgit v1.2.3