diff --git a/test/lisp/emacs-lisp/generator-tests.el b/test/lisp/emacs-lisp/generator-tests.el index 1a567ac70f..11542ab15d 100644 --- a/test/lisp/emacs-lisp/generator-tests.el +++ b/test/lisp/emacs-lisp/generator-tests.el @@ -282,3 +282,10 @@ identical output. (ert-deftest cps-test-declarations-preserved () (should (equal (documentation 'generator-with-docstring) "Documentation!")) (should (equal (get 'generator-with-docstring 'lisp-indent-function) 5))) + +;; Bug #26068. The problem is that `pcase' uses several `x' symbols, +;; which are not identical, but have the same name. +(ert-deftest cps-test-symbols-with-same-name () + (should (equal (iter-next (funcall (iter-lambda () (pcase (list 1 2) + (`(,a ,b) (iter-yield (+ a b))))))) + 3)))