mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A `for` loop's initializer and a `for...of` loop's iterable run once, but SC6101 counted any dynamic operation inside a loop statement's span, so untyped setup there produced the warning and failed --fail-on=dynamic. Loop work is now found by walking the IR: a loop's condition, update and body repeat, its initializer and iterable do not. Locations could not tell them apart, because lowering gives the index loop of a `for...of` the whole statement's span.