enforce integer division via explicit builtins

This commit is contained in:
2026-07-13 11:39:06 +02:00
parent a4d0fb1e26
commit 2ed333c70d
13 changed files with 1004 additions and 98 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ reserve func($T type, list @mut ArrayList(T), minimum_capacity usize) void ! mem
new_capacity usize = 8
if list.capacity >= 8 {
half usize :: list.capacity / 2
half usize :: div_trunc(list.capacity, 2)
if list.capacity > max_value(usize) - half {
new_capacity = minimum_capacity
} else {