Subject: bug#64646: Master: Native compiler doesn't always compile lambda forms.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Jul 2023 16:06:18 +0300

> Date: Sat, 15 Jul 2023 12:10:06 +0000
> From: Alan Mackenzie <[email-masked]>
> 
> In the master branch:
> 
> (i) emacs -Q
> (ii) C-x b foo.el <RET>
> (iii) Insert into foo.el:
>     ;; -*- lexical-binding:t -*-
> (iv) M-x emacs-lisp-mode
> (v) Insert into foo.el:
>     (defun foo () "foo doc string"
>       (lambda (bar) "lambda doc string" (car bar)))
> (vi) With point after the function, C-x C-e to evaluate it.
> 
> (vii) M-: (native-compile 'foo)
> This returns #<subr foo>
> (viii) M-: (foo)
> This returns the lambda form as a byte-compiled function.  This is a bug:
> it should return the lambda form as a native-compiled function.

Why do you think it should return the native-compiled form?  Based on
what?