From 1362a9fec4dff341a84c881ac17dbf1ee2cf82fd Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Fri, 5 Mar 2021 20:21:01 +0100 Subject: Make lambda-lifting work again * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Fix typo. * test/lisp/emacs-lisp/cconv-tests.el (cconv-convert-lambda-lifted): Add test case. --- test/lisp/emacs-lisp/cconv-tests.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/lisp/emacs-lisp/cconv-tests.el') diff --git a/test/lisp/emacs-lisp/cconv-tests.el b/test/lisp/emacs-lisp/cconv-tests.el index 517373386e3..5aeed0cc155 100644 --- a/test/lisp/emacs-lisp/cconv-tests.el +++ b/test/lisp/emacs-lisp/cconv-tests.el @@ -182,7 +182,14 @@ (should (eq (cconv-tests-cl-defsubst) 'cl-defsubst-result))) (ert-deftest cconv-convert-lambda-lifted () - "Bug#30872." + ;; Verify that lambda-lifting is actually performed at all. + (should (equal (cconv-closure-convert + '#'(lambda (x) (let ((f #'(lambda () (+ x 1)))) + (funcall f)))) + '#'(lambda (x) (let ((f #'(lambda (x) (+ x 1)))) + (funcall f x))))) + + ;; Bug#30872. (should (equal (funcall (byte-compile -- cgit v1.2.3