Ticket #1099 (closed defect: fixed)

Opened 15 months ago

Last modified 13 months ago

LOOP named NIL does not establish a BLOCK

Reported by: sionescu Owned by: rme
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description

(loop named nil do (return 1)) does not establish a block at all instead of one named NIL, as I'd expect from 6.1.1.5.6: "The loop named construct gives a name for the block of the loop". There's no mention that specifying the name as NIL instead of defaulting to NIL through omission allows for the omission of the loop block.

Change History

comment:1 Changed 13 months ago by rme

  • Owner set to rme

comment:2 Changed 13 months ago by rme

  • Status changed from new to closed
  • Resolution set to fixed

(In [15924]) Fix the loop facility so that (loop named nil ...) actually generates a block named nil.

A CL loop form can have only one named clause, so in loop-do-named, simply set *loop-names* to a list containing the symbol that should be the loop's name.

In loop-translate, we know that *loop-names* will be either nil or a list of one symbol, so just use (car *loop-names*) as the name of the loop's implicit block.

Closes ticket:1099.

Note: See TracTickets for help on using tickets.