[Top][All Lists]

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

[Chicken-users] Bug with #!optional in Chicken 4.8.0

From: John Croisant
Subject: [Chicken-users] Bug with #!optional in Chicken 4.8.0
Date: Sat, 13 Oct 2012 20:34:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121010 Thunderbird/16.0.1

In Chicken 4.8.0, procedures defined with #!optional no longer signal an exception if invoked with too many arguments. For example:

(define (foo x #!optional y) (list x y))
(foo 'x 'y 'too 'many 'args)

In Chicken 4.7, this would signal an exception, because the foo procedure expects a maximum of 2 arguments. In Chicken 4.8, the extra arguments are simply ignored.

I think this is a bug, because the docs for "Extended DSSSL style lambda lists" say:

If there is no rest-parameter  and no keyword-parameters in the
> parameter-list, then it shall be an error for any extra arguments to
> be passed to the procedure.

- John

reply via email to

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