aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-11-14 17:38:05 +0100
committerAndrea Corallo2020-11-14 22:06:31 +0100
commitf702426780475309bdd33ef896d28dd33484246b (patch)
tree2249e3d3de374e99728b0ccfef87403a41648474 /test/src
parentbcecdedcb7ee02a58383de396bf05fda88654a30 (diff)
downloademacs-f702426780475309bdd33ef896d28dd33484246b.tar.gz
emacs-f702426780475309bdd33ef896d28dd33484246b.zip
Add `comp-constraint-to-type-spec' and better handle boolean type spec
* lisp/emacs-lisp/comp.el (comp-constraint-to-type-spec): New function splitting out code from comp-ret-type-spec + better handle boolean type specifier. (comp-ret-type-spec): Rework to leverage `comp-constraint-to-type-spec'. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add a testcase.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index a293a490d95..d377b089932 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -880,7 +880,11 @@ Return a list of results."
880 (when x 880 (when x
881 (setf y x)) 881 (setf y x))
882 y)) 882 y))
883 t))) 883 t)
884
885 ((defun comp-tests-ret-type-spec-f (x y)
886 (eq x y))
887 boolean)))
884 888
885(comp-deftest ret-type-spec () 889(comp-deftest ret-type-spec ()
886 "Some derived return type specifier tests." 890 "Some derived return type specifier tests."