Add implict tagbody to dolist
This commit is contained in:
parent
e2df0bcefe
commit
d5f4e2b6bb
2 changed files with 15 additions and 2 deletions
|
@ -1134,7 +1134,7 @@ sub macro_dotimes {
|
|||
|
||||
slurp_token($ts, RPAREN, "Expected ) after count-form or result-form in dotimes");
|
||||
|
||||
my $body = macro_progn($ts);
|
||||
my $body = macro_tagbody($ts);
|
||||
|
||||
return create_block(
|
||||
"nil",
|
||||
|
|
15
t/dotimes.t
15
t/dotimes.t
|
@ -1,4 +1,4 @@
|
|||
(plan 5)
|
||||
(plan 6)
|
||||
|
||||
(expect "dotimes - executes body n times"
|
||||
(let ((pings 0))
|
||||
|
@ -28,3 +28,16 @@
|
|||
(dotimes (i -3)
|
||||
(throw 'test 'fail))
|
||||
'ok)))
|
||||
|
||||
(defun nop () nil)
|
||||
|
||||
(expect "dotimes - implicit tagbody"
|
||||
(equal 'ok
|
||||
(catch 'test
|
||||
(dotimes (e 1)
|
||||
nil
|
||||
(go end)
|
||||
middle
|
||||
(throw 'test 'fail)
|
||||
end)
|
||||
'ok)))
|
||||
|
|
Loading…
Reference in a new issue