summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
diff options
context:
space:
mode:
authorAndrea Corallo <acorallo@gnu.org>2024-05-13 16:41:25 +0200
committerAndrea Corallo <acorallo@gnu.org>2024-05-13 16:49:29 +0200
commit595799edd3188a8992bbd08d0b29feaf184a092e (patch)
tree19c5c415a4097f340a32acd44250e935f2f7031f /lisp/emacs-lisp/comp.el
parente86c4d8bdc8bdbc959a1f7f03576205ce707743e (diff)
downloademacs-595799edd3188a8992bbd08d0b29feaf184a092e.tar.gz
emacs-595799edd3188a8992bbd08d0b29feaf184a092e.tar.bz2
emacs-595799edd3188a8992bbd08d0b29feaf184a092e.zip
* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-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.")
(defun comp--get-function-cstr (function)
"Given FUNCTION return the corresponding `comp-constraint'."
(when (symbolp function)
- (let ((f (symbol-function function)))
- (or (gethash f comp-primitive-func-cstr-h)
- (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun function)))
- (comp-func-declared-type f))
- (function-get function 'function-type))))
- (comp-type-spec-to-cstr type))))))
+ (or (gethash function comp-primitive-func-cstr-h)
+ (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun function)))
+ (comp-func-declared-type f))
+ (function-get function 'function-type))))
+ (comp-type-spec-to-cstr type)))))
;; Keep it in sync with the `cl-deftype-satisfies' property set in
;; cl-macs.el. We can't use `cl-deftype-satisfies' directly as the