Fix mistake in switch-case generation of null
(bug#49746)
Reported by Gregor Zattler. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Be more careful in the selection of equality. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case.
This commit is contained in:
parent
989937e1bc
commit
949dd41c31
2 changed files with 8 additions and 1 deletions
|
@ -503,6 +503,12 @@
|
|||
(:success 'good))
|
||||
(1+ x))))
|
||||
(funcall f 3))
|
||||
|
||||
;; Check `not' in cond switch (bug#49746).
|
||||
(mapcar (lambda (x) (cond ((equal x "a") 1)
|
||||
((member x '("b" "c")) 2)
|
||||
((not x) 3)))
|
||||
'("a" "b" "c" "d" nil))
|
||||
)
|
||||
"List of expressions for cross-testing interpreted and compiled code.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue