From: Andrea Corallo Date: Mon, 13 May 2024 14:41:25 +0000 (+0200) Subject: * lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=36cb710fb623c095f1f5bbc6d726f07c58fcb4ee;p=emacs.git * lisp/emacs-lisp/comp.el (comp--get-function-cstr): Fix it. (cherry picked from commit 595799edd3188a8992bbd08d0b29feaf184a092e) --- 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