1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix condition-case optimiser bug

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't
perform incorrect optimisations when a condition-case variable shadows
another lexical variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
New test case.
This commit is contained in:
Mattias Engdegård 2021-04-09 18:59:09 +02:00
parent b7a7e879d0
commit 59342f689e
2 changed files with 14 additions and 2 deletions

View file

@ -431,6 +431,12 @@
(let ((x 2))
(list (or (bytecomp-test-identity 'a) (setq x 3)) x))
(let* ((x 1)
(y (condition-case x
(/ 1 0)
(arith-error x))))
(list x y))
)
"List of expressions for cross-testing interpreted and compiled code.")