Skip to content

Commit

Permalink
fix building jaq-interpret tests on 32-bit platforms (#159)
Browse files Browse the repository at this point in the history
4999950000 overflows a usize (u32)
  • Loading branch information
nekopsykose authored Feb 7, 2024
1 parent ce988d5 commit b5e022e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jaq-interpret/src/rc_lazy_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn drop() {
let list = List::from_iter(0..100_000);
// clone() ensures that we keep a copy of the whole list around
// sum() then evaluates the whole list
assert_eq!(list.clone().sum::<usize>(), 4999950000);
assert_eq!(list.clone().sum::<u64>(), 4999950000);
// at the end, a long, fully evaluated list is dropped,
// which would result in a stack overflow without the custom `Drop` impl
std::mem::drop(list);
Expand Down

0 comments on commit b5e022e

Please sign in to comment.