aboutsummaryrefslogtreecommitdiff
path: root/src/interp/iterator.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/iterator.boot')
-rw-r--r--src/interp/iterator.boot5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interp/iterator.boot b/src/interp/iterator.boot
index 70a52f6d..d62f4939 100644
--- a/src/interp/iterator.boot
+++ b/src/interp/iterator.boot
@@ -132,7 +132,10 @@ compRepeatOrCollect(form,m,e) ==
(u:=modeIsAggregateOf('Vector,targetMode,e)) => CAR u
["Vector",m']
m'
- coerceExit([form',m'',e'],targetMode)
+ T := coerceExit([form',m'',e'],targetMode) or return nil
+ -- iterator variables and other variables declared in
+ -- in a loop are local to the loop.
+ [T.expr,T.mode,e]
--constructByModemap([x,source,e],target) ==
-- u:=