From c69c185109c90ecc486ab707ed32d7bb7aa467d5 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 29 Mar 2020 10:57:36 +0100 Subject: [PATCH] Add comp-test-40187 checking function shadowing. --- test/src/comp-test-funcs.el | 8 ++++++++ test/src/comp-tests.el | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 67b85753b8a..9fcc132b518 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -272,6 +272,14 @@ (defun comp-test-interactive-form2-f () (interactive)) +(defun comp-test-40187-2-f () + 'foo) + +(defalias 'comp-test-40187-1-f (symbol-function 'comp-test-40187-2-f)) + +(defun comp-test-40187-2-f () + 'bar) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index c4f46b63dda..4768e1a1ace 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -339,6 +339,12 @@ Check that the resulting binaries do not differ." (should (equal (interactive-form #'comp-tests-free-fun-f) '(interactive)))) +(ert-deftest comp-test-40187 () + "Check function name shadowing. +https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html." + (should (eq (comp-test-40187-1-f) 'foo)) + (should (eq (comp-test-40187-2-f) 'bar))) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; -- 2.39.5