aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2024-05-13 16:41:25 +0200
committerAndrea Corallo2024-05-13 16:49:29 +0200
commit595799edd3188a8992bbd08d0b29feaf184a092e (patch)
tree19c5c415a4097f340a32acd44250e935f2f7031f
parente86c4d8bdc8bdbc959a1f7f03576205ce707743e (diff)
downloademacs-595799edd3188a8992bbd08d0b29feaf184a092e.tar.gz
emacs-595799edd3188a8992bbd08d0b29feaf184a092e.zip
* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it.
-rw-r--r--lisp/emacs-lisp/comp.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index fa866b802cc..0536b45d118 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -197,12 +197,11 @@ Useful to hook into pass checkers.")
197(defun comp--get-function-cstr (function) 197(defun comp--get-function-cstr (function)
198 "Given FUNCTION return the corresponding `comp-constraint'." 198 "Given FUNCTION return the corresponding `comp-constraint'."
199 (when (symbolp function) 199 (when (symbolp function)
200 (let ((f (symbol-function function))) 200 (or (gethash function comp-primitive-func-cstr-h)
201 (or (gethash f comp-primitive-func-cstr-h) 201 (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun function)))
202 (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun function))) 202 (comp-func-declared-type f))
203 (comp-func-declared-type f)) 203 (function-get function 'function-type))))
204 (function-get function 'function-type)))) 204 (comp-type-spec-to-cstr type)))))
205 (comp-type-spec-to-cstr type))))))
206 205
207;; Keep it in sync with the `cl-deftype-satisfies' property set in 206;; Keep it in sync with the `cl-deftype-satisfies' property set in
208;; cl-macs.el. We can't use `cl-deftype-satisfies' directly as the 207;; cl-macs.el. We can't use `cl-deftype-satisfies' directly as the