Subject: bug#46834: closed (Re: bug#46834: 28.0.50; byte-compiling the standard counter closure fails)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 02 Mar 2021 07:37:01 +0000

Your bug report

#46834: 28.0.50; byte-compiling the standard counter closure fails

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
46834: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46834
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#46834: 28.0.50; byte-compiling the standard counter closure fails
From: Pip Cet <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked], Stefan Monnier <[email-masked]>
Date: Tue, 2 Mar 2021 07:36:06 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On Tue, Mar 2, 2021 at 7:34 AM Lars Ingebrigtsen <[email-masked]> wrote:
> > It's been a while since I pushed, did I get that right?
>
> Yup; looks perfect.

Thanks for checking, and I'm closing the bug.

Pip

Subject: 28.0.50; byte-compiling the standard counter closure fails
From: Pip Cet <[email-masked]>
To: [email-masked]
Date: Sun, 28 Feb 2021 15:04:06 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

(My apologies if this is well-known, documented, or plain stupid on my
part, but I think it's an interesting gotcha. Feel free to close
immediately in those cases.)

Steps to reproduce from emacs -Q:
Evaluate the following in a lexically-bound Emacs Lisp buffer:

(byte-compile (let ((l 0)) (lambda () (cl-incf l))))

Expected result:

A byte code object which will increment its return value by one every
time it is called.

Actual result:

A byte code object which always returns 1.