Skip to content

Commit

Permalink
fix reference_counts test
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Dec 4, 2024
1 parent 9957363 commit 1fd1e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_programs/execution_success/reference_counts/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ fn borrow(array: [Field; 3], rc_before_call: u32) {
}

fn borrow_mut(array: &mut [Field; 3], rc_before_call: u32) {
assert_refcount(*array, rc_before_call + 0); // Issue! This should be rc_before_call + 1
assert_refcount(*array, rc_before_call + 1); // Issue! This should be rc_before_call + 1
array[0] = 5;
println(array[0]);
}

fn copy_mut(mut array: [Field; 3], rc_before_call: u32) {
assert_refcount(array, rc_before_call + 0); // Issue! This should be rc_before_call + 1
assert_refcount(array, rc_before_call + 1); // Issue! This should be rc_before_call + 1
array[0] = 6;
println(array[0]);
}
Expand Down

0 comments on commit 1fd1e9b

Please sign in to comment.