#319 DESTRUCTURING-BIND does not work properly on infinite lists

closed-fixed
clisp (525)
5
2006-04-18
2006-01-31
No

Transcript of a session with CLISP 2.38:

[1]> (defvar *vars* '#1=(a b c d e . #1#))
*VARS*
[2]> (destructuring-bind (a b c d e &rest ignore) *vars*
(list a b c d e))

Expected: (A B C D E)
Got: "*** - <: NIL is not a real number" (as an error
message, of course)

Discussion

  • Sam Steingold

    Sam Steingold - 2006-01-31
    • assigned_to: sds --> haible
     
  • Jörg Höhle

    Jörg Höhle - 2006-02-01

    Logged In: YES
    user_id=377168

    Confirmed. This surprises me even more so since I recently
    looked at the code to see whether it would work with
    non-proper lists (it must work, and does work with dotted
    lists) and did not see that other fault.

     
  • Bruno Haible

    Bruno Haible - 2006-04-18

    Logged In: YES
    user_id=5923

    Fixed in CVS. Thanks for the report: it was not only a bug
    (for circular lists), it was also a performance problem (for
    long proper lists).

     
  • Bruno Haible

    Bruno Haible - 2006-04-18
    • status: open --> closed-fixed
     

Log in to post a comment.