[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20918: Optional argument skipped
From: |
Lars Ingebrigtsen |
Subject: |
bug#20918: Optional argument skipped |
Date: |
Thu, 01 Aug 2019 22:37:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Jean TBM <jean@tbm.email> writes:
> SYMPTOM:
> When the keyword &optional is specified more than once, a function will
> behave differently when byte compiled.
>
> EXAMPLE:
>
> (defun foo(&optional value1 &optional value2)
> (message "Value1: %s\nValue2:%s"
> value1
> value2)
> )
>
> (foo "a" "b")
> ===
> When not byte compiled:
>
> Value1: a
> Value2: b
>
> When byte compiled:
>
> Value1: b
> Value2: nil
(I'm going through old bug reports that have unfortunately not gotten
any responses.)
It looks like this has been fixed in the intervening years.
Calling foo uncompiled will now yield and error. Trying to byte-compile
it will also result in an error, so it's now consistent, and I'm closing
this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#20918: Optional argument skipped,
Lars Ingebrigtsen <=