mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 08:10:21 -08:00
* lisp/emacs-lisp/cconv.el: Don't confuse a string for a docstring
(cconv--convert-funcbody): Check there's something after a docstring. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-string-vs-docstring): New corresponding test.
This commit is contained in:
parent
40d8f83e53
commit
7561c01380
2 changed files with 8 additions and 2 deletions
|
|
@ -1222,6 +1222,11 @@ compiled correctly."
|
|||
(byte-compile 'counter)
|
||||
(should (equal (counter) 1))))))
|
||||
|
||||
(ert-deftest bytecomp-string-vs-docstring ()
|
||||
;; Don't confuse a string return value for a docstring.
|
||||
(let ((lexical-binding t))
|
||||
(should (equal (funcall (byte-compile '(lambda (x) "foo")) 'dummy) "foo"))))
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue