Vec's reverse Foreach macros wrapped the iteration loop in two run-once
for-loops (to inject the var/run_once declarations), so a break in the body
exited those wrappers rather than the iteration loop -- iteration silently
continued to the next element, while the forward variants stopped. Fixed for
Vec in commit 1179837 (iteration loop made innermost, mirroring the forward
variants; shrink-during-iteration guard preserved; forward + reverse
early-break tests added).
The same run-once-wrapper shape almost certainly exists in the reverse Foreach
macros of List, Map, Str, Graph, and BitVec, so break is likely swallowed
there too. Sweep each, apply the same fix, and add a reverse early-break test
per container.
Vec's reverse Foreach macros wrapped the iteration loop in two run-once
for-loops (to inject the var/run_once declarations), so a
breakin the bodyexited those wrappers rather than the iteration loop -- iteration silently
continued to the next element, while the forward variants stopped. Fixed for
Vec in commit 1179837 (iteration loop made innermost, mirroring the forward
variants; shrink-during-iteration guard preserved; forward + reverse
early-break tests added).
The same run-once-wrapper shape almost certainly exists in the reverse Foreach
macros of List, Map, Str, Graph, and BitVec, so
breakis likely swallowedthere too. Sweep each, apply the same fix, and add a reverse early-break test
per container.