diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-03-05 20:21:01 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-03-05 21:41:58 +0100 |
commit | 1362a9fec4dff341a84c881ac17dbf1ee2cf82fd (patch) | |
tree | ab8582f6b0551316bef6e29c5b18afe6aba8c9a4 /test/lisp/emacs-lisp | |
parent | 1ff46018f6bdb9641d1044043e6038dfffc897ae (diff) | |
download | emacs-1362a9fec4dff341a84c881ac17dbf1ee2cf82fd.tar.gz emacs-1362a9fec4dff341a84c881ac17dbf1ee2cf82fd.tar.bz2 emacs-1362a9fec4dff341a84c881ac17dbf1ee2cf82fd.zip |
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.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/cconv-tests.el | 9 |
1 files changed, 8 insertions, 1 deletions
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 |