]> git.eshelyaron.com Git - emacs.git/commitdiff
Add comp-test-40187 checking function shadowing.
authorAndrea Corallo <akrl@sdf.org>
Sun, 29 Mar 2020 09:57:36 +0000 (10:57 +0100)
committerAndrea Corallo <akrl@sdf.org>
Sun, 29 Mar 2020 11:30:33 +0000 (12:30 +0100)
test/src/comp-test-funcs.el
test/src/comp-tests.el

index 67b85753b8abdfc708834aebdf57112ed9ba9696..9fcc132b5187ba6ec96a09adb11880320b9e8ee2 100644 (file)
 (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)
+
 \f
 ;;;;;;;;;;;;;;;;;;;;
 ;; Tromey's tests ;;
index c4f46b63ddad2ba82cd3bd3041ceab07974f65a3..4768e1a1acecda391021b560cfa03487f261785f 100644 (file)
@@ -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)))
+
 \f
 ;;;;;;;;;;;;;;;;;;;;
 ;; Tromey's tests ;;