chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] bug in let-optionals in 4.5.0?


From: Alejandro Forero Cuervo
Subject: [Chicken-users] bug in let-optionals in 4.5.0?
Date: Mon, 5 Jul 2010 00:33:58 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

I'm experimenting with my format-compiler extension.  I got past the
limitation preventing the module system from dealing with recursively
dependent modules by moving all the functionality of my format
compiler to format-compiler-base, the unit tests (using the
embedded-test framework) to format-compiler and making embedded-test
depend in format-compiler-base.

Now I'm stuck in another problem, it seems to be caused by a bug in
let-optionals.  In Chicken 3.4.0, the following form evaluates to #f,
as expected:

  (let-optionals '(#f) ((rest #f)) #f)

In Chicken 4.5.0, both csi and in compiled code, it yields an error:

  Error: too many optional arguments: #f

The following, however, works:

  (let-optionals '(#f) ((rest2 #f)) #f)

Does anybody use let-optionals?  Is this a known issue fixed in newer
versions? It strikes me as surprising that such simple errors could go
undetected.  Am I supposed to use some form other than let-optionals
for the kind of thing it does?

I guess I'll workaround this by making sure to never name any
variables “rest” —adding yet another to the list of workarounds I've
had to make to keep my Chicken code working—, but I figured I'd report
the problem, I think it'd be best if it was fixed in Chicken, to save
others from wasting hours like I just did.

Thanks!

Alejo.
http://azul.freaks-unidos.net/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]