`for i in list[str]` binds i as i8*; a following `for i in range(3)`
reused that slot, so the integer index/comparison was written through an
i8* slot. With opaque pointers the store was accepted and the renderer
then saw a pointer-typed constant 3/6
(`[MLIR-FAIL] unsupported constant operand form`); without the renderer
check it silently corrupted the value.
- range loops accept any existing integer slot (the first width wins,
as before) but reject non-integer slots;
- list / array / pointer / dict / OOP iteration require the exact
element type, compared structurally (pointer depth + unwrapped base
type, because opaque pointers print alike);
- a mismatch fails fast with TypeError naming the old and new types and
suggesting a different variable name.
Probe: list[int] then range still works (prints 10/20/30, 10, 10);
list[str] then range now reports `loop variable 'i' is already declared
as '!llvm.ptr'; cannot reuse it as 'i32'`; the reporting project
compiles and runs; self-host 110/110; ListTest, GenericTest3, PtrOpProbe
and HashLibTest pass.