GNU bug report logs - #24912
25.1.50; Byte compiler generates incorrect code when second &optional is used

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 9 Nov 2016 21:10:01 UTC

Severity: minor

Found in version 25.1.50

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 24912-done <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: 24912-done <at> debbugs.gnu.org
Subject: Re: bug#24912: 25.1.50; Byte compiler generates incorrect code when
 second &optional is used
Date: Tue, 22 Nov 2016 13:10:35 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Mi., 9. Nov. 2016 um
22:11 Uhr:

>
> emacs -Q
>
> In *scratch*, evaluate:
>
> (funcall
>  (let ((lexical-binding t))
>    (byte-compile
>     (lambda (&optional a b)
>       (list a b))))
>  'a 'b)
>
> Result is (a b), as expected.  Now evaluate
>
> (funcall
>  (let ((lexical-binding t))
>    (byte-compile
>     (lambda (&optional a &optional b)
>       (list a b))))
>  'a 'b)
>
> Result is (b nil).
>
> Emacs should either generate correct code in both cases, or signal an
> error in the latter case.
>
> Fixed with commit  0d913da15c094bf596dd685acecf3438228c15cf.
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.