The break loop's typed-value walk prints arrays and slices as [1 2 3], matching evaluation

This commit is contained in:
Joseph Ferano 2026-09-25 22:18:45 +07:00
parent a1e5e39dba
commit c1b21edaf4

View File

@ -295,7 +295,7 @@ let rec walk c b depth addr (ty : Types.t) =
let shown = min n Render.max_span and sz = size c t in
put b "[";
for i = 0 to shown - 1 do
put b " ";
if i > 0 then put b " ";
walk c b (depth + 1) (addr + (i * sz)) t
done;
if n > shown then put b " ...";
@ -307,7 +307,7 @@ let rec walk c b depth addr (ty : Types.t) =
let sz = size c t in
put b "[";
for i = 0 to n - 1 do
put b " ";
if i > 0 then put b " ";
walk c b (depth + 1) (p + (i * sz)) t
done;
put b "]"