diff options
| author | Andrea Corallo | 2024-03-26 11:14:08 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2024-03-26 11:14:08 +0100 |
| commit | 8cc67dbcec0753c5579e63bf82bfe247debe222c (patch) | |
| tree | 1e35b49a8a150785138ccf4889888bc40252a0a0 /test | |
| parent | b7b9a0a5c1afae07b8168e85dcf1fc37d29e98ef (diff) | |
| download | emacs-8cc67dbcec0753c5579e63bf82bfe247debe222c.tar.gz emacs-8cc67dbcec0753c5579e63bf82bfe247debe222c.zip | |
Fix native comp prediction on null functionp tested objects
* lisp/emacs-lisp/comp.el (comp-known-predicates)
(comp-known-predicates-h): Update.
(comp--pred-to-pos-cstr, comp--pred-to-neg-cstr): New functions.
(comp--add-cond-cstrs): Make use of them.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/src/comp-tests.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index fbcb6ca9560..b2fd2f68826 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -1496,7 +1496,14 @@ Return a list of results." | |||
| 1496 | (if (comp-foo-p x) | 1496 | (if (comp-foo-p x) |
| 1497 | x | 1497 | x |
| 1498 | (error ""))) | 1498 | (error ""))) |
| 1499 | 'comp-foo))) | 1499 | 'comp-foo) |
| 1500 | |||
| 1501 | ;; 80 | ||
| 1502 | ((defun comp-tests-ret-type-spec-f (x) | ||
| 1503 | (if (functionp x) | ||
| 1504 | (error "") | ||
| 1505 | x)) | ||
| 1506 | '(not function)))) | ||
| 1500 | 1507 | ||
| 1501 | (defun comp-tests-define-type-spec-test (number x) | 1508 | (defun comp-tests-define-type-spec-test (number x) |
| 1502 | `(comp-deftest ,(intern (format "ret-type-spec-%d" number)) () | 1509 | `(comp-deftest ,(intern (format "ret-type-spec-%d" number)) () |