[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 991bf3f0f5d: * Fix comp-function-type-spec for non symbol input (
From: |
Andrea Corallo |
Subject: |
master 991bf3f0f5d: * Fix comp-function-type-spec for non symbol input (bug#66021) |
Date: |
Mon, 18 Sep 2023 04:16:02 -0400 (EDT) |
branch: master
commit 991bf3f0f5dff66794785ebfcc867611fe75e0da
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>
* Fix comp-function-type-spec for non symbol input (bug#66021)
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Make it robust
against closures (bug#66021).
---
lisp/emacs-lisp/comp.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index bb4552459dd..e1bb70fe5d4 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -4506,8 +4506,10 @@ inferred from the code itself by the native compiler; if
it is
type-spec )
(when-let ((res (gethash function comp-known-func-cstr-h)))
(setf type-spec (comp-cstr-to-type-spec res)))
- (let ((f (symbol-function function)))
- (when (and (null type-spec)
+ (let ((f (and (symbolp function)
+ (symbol-function function))))
+ (when (and f
+ (null type-spec)
(subr-native-elisp-p f))
(setf kind 'inferred
type-spec (subr-type f))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 991bf3f0f5d: * Fix comp-function-type-spec for non symbol input (bug#66021),
Andrea Corallo <=