diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-09-25 12:15:21 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-09-25 20:25:02 +0200 |
commit | 45c32d7f00e225a78e6c8b2251de335e93e556e0 (patch) | |
tree | cf0058e94deabaf35a76c4d43693dc4c3b56f977 /test/lisp/emacs-lisp | |
parent | e93bdfb6dafd4cb8d660e1330a8527f61e831eab (diff) | |
download | emacs-45c32d7f00e225a78e6c8b2251de335e93e556e0.tar.gz emacs-45c32d7f00e225a78e6c8b2251de335e93e556e0.tar.bz2 emacs-45c32d7f00e225a78e6c8b2251de335e93e556e0.zip |
Fix byte-compiler crash for legal dynamic-binding code
This should really be taken care of by a syntax normalisation step in
the frontend, but there is no such step for non-lexbind code yet.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Tolerate bindingsa
without initialising expressions.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index ded6351c5ee..d56c60b1f1d 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -573,6 +573,14 @@ inner loops respectively." (let ((_a 1) (_b 2)) 'z) + (let (x y) + y) + (let* (x y) + y) + (let (x y) + 'a) + (let* (x y) + 'a) ;; Check empty-list optimisations. (mapcar (lambda (x) (member x nil)) '("a" 2 nil)) |