diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-20 16:20:41 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-20 16:20:41 -0400 |
| commit | 3c4f477b845ac6b462547da820f4550faf3cbb7c (patch) | |
| tree | 94dab5450939efe133e2b9573f33d1f2069eb093 /test | |
| parent | 5b945d8fc6b644e1b6a3704d8791c7f5960c1dcb (diff) | |
Bugfix some copy-on-write cases for when pointers are automatically
derefenced for method calls
Diffstat (limited to 'test')
| -rw-r--r-- | test/arrays.tm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/arrays.tm b/test/arrays.tm index c693996e..21c8cb5c 100644 --- a/test/arrays.tm +++ b/test/arrays.tm @@ -76,7 +76,11 @@ func main(): do: >> arr := [10, 20, 30] - >> arr:reversed() + >> reversed := arr:reversed() + = [30, 20, 10] + // Ensure the copy-on-write behavior triggers: + >> arr[1] = 999 + >> reversed = [30, 20, 10] do: |
