Fix typo in cconv

* lisp/emacs-lisp/cconv.el (cconv-convert): Typo.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
This commit is contained in:
Mattias Engdegård 2021-04-11 12:38:37 +02:00
parent 0334fa0532
commit 01a513bf0b
2 changed files with 8 additions and 1 deletions

View file

@ -498,7 +498,7 @@ places where they originally did not directly appear."
(let* ((class (and var (cconv--var-classification (list var) form))) (let* ((class (and var (cconv--var-classification (list var) form)))
(newenv (newenv
(cond ((eq class :captured+mutated) (cond ((eq class :captured+mutated)
(cons `(,var . (car-save ,var)) env)) (cons `(,var . (car-safe ,var)) env))
((assq var env) (cons `(,var) env)) ((assq var env) (cons `(,var) env))
(t env))) (t env)))
(msg (when (eq class :unused) (msg (when (eq class :unused)

View file

@ -437,6 +437,13 @@
(/ 1 0) (/ 1 0)
(arith-error x)))) (arith-error x))))
(list x y)) (list x y))
(funcall
(condition-case x
(/ 1 0)
(arith-error (prog1 (lambda (y) (+ y x))
(setq x 10))))
4)
) )
"List of expressions for cross-testing interpreted and compiled code.") "List of expressions for cross-testing interpreted and compiled code.")