From: Andrea Corallo Date: Sun, 14 Mar 2021 20:54:06 +0000 (+0100) Subject: Fix some entry in `comp-known-type-specifiers' (bug#46847) X-Git-Tag: emacs-28.0.90~2727^2~71 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e4ec4d3c944f586892e08ea4fb7715e0f6ac365;p=emacs.git Fix some entry in `comp-known-type-specifiers' (bug#46847) * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Some fix. * test/src/comp-tests.el (comp-tests-46670-1): Update test. --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 866ee8dcf73..97efd1ab0c7 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -258,8 +258,8 @@ Useful to hook into pass checkers.") (>= (function ((or number marker) &rest (or number marker)) boolean)) (abs (function (number) number)) (acos (function (number) float)) - (append (function (&rest list) list)) - (aref (function (array fixnum) t)) + (append (function (&rest t) t)) + (aref (function (t fixnum) t)) (arrayp (function (t) boolean)) (ash (function (integer integer) integer)) (asin (function (number) float)) @@ -269,7 +269,7 @@ Useful to hook into pass checkers.") (bignump (function (t) boolean)) (bobp (function () boolean)) (bolp (function () boolean)) - (bool-vector-count-consecutive (function (bool-vector bool-vector integer) fixnum)) + (bool-vector-count-consecutive (function (bool-vector boolean integer) fixnum)) (bool-vector-count-population (function (bool-vector) fixnum)) (bool-vector-not (function (bool-vector &optional bool-vector) bool-vector)) (bool-vector-p (function (t) boolean)) @@ -384,7 +384,7 @@ Useful to hook into pass checkers.") (integer-or-marker-p (function (t) boolean)) (integerp (function (t) boolean)) (interactive-p (function () boolean)) - (intern-soft (function (string &optional vector) symbol)) + (intern-soft (function ((or string symbol) &optional vector) symbol)) (invocation-directory (function () string)) (invocation-name (function () string)) (isnan (function (float) boolean)) @@ -394,7 +394,7 @@ Useful to hook into pass checkers.") (last (function (list &optional integer) list)) (lax-plist-get (function (list t) t)) (ldexp (function (number integer) float)) - (length (function (sequence) integer)) + (length (function (t) (integer 0 *))) (length< (function (sequence fixnum) boolean)) (length= (function (sequence fixnum) boolean)) (length> (function (sequence fixnum) boolean)) @@ -441,7 +441,7 @@ Useful to hook into pass checkers.") (nlistp (function (t) boolean)) (not (function (t) boolean)) (nth (function (integer list) t)) - (nthcdr (function (integer list) list)) + (nthcdr (function (integer t) t)) (null (function (t) boolean)) (number-or-marker-p (function (t) boolean)) (number-to-string (function (number) string)) @@ -481,7 +481,7 @@ Useful to hook into pass checkers.") (sqrt (function (number) float)) (standard-case-table (function () char-table)) (standard-syntax-table (function () char-table)) - (string (function (&rest fixnum) strng)) + (string (function (&rest fixnum) string)) (string-as-multibyte (function (string) string)) (string-as-unibyte (function (string) string)) (string-equal (function ((or string symbol) (or string symbol)) boolean)) @@ -519,7 +519,7 @@ Useful to hook into pass checkers.") (type-of (function (t) symbol)) (unibyte-char-to-multibyte (function (fixnum) fixnum)) ;; byte is fixnum (upcase (function ((or fixnum string)) (or fixnum string))) - (user-full-name (function (&optional integer) string)) + (user-full-name (function (&optional integer) (or string null))) (user-login-name (function (&optional integer) (or string null))) (user-original-login-name (function (&optional integer) (or string null))) (user-real-login-name (function () string)) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index f60e4ab0497..b618110bbe4 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -501,7 +501,7 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html." "" (should (string= (comp-test-46670-2-f "foo") "foo")) (should (equal (subr-type (symbol-function #'comp-test-46670-2-f)) - '(function (t) (or null sequence))))) + '(function (t) t)))) (comp-deftest 46824-1 () ""