Skip to content
Snippets Groups Projects
Commit 6daa4eb0 authored by ram's avatar ram
Browse files

Fixed FIND-TEMPLATE to do what the comment said with :CONDITIONAL templates,

and not try to test "result types" if the template is conditional but
not in a conditional context.
parent 7a10c2a6
No related branches found
No related tags found
No related merge requests found
......@@ -644,17 +644,18 @@
(let* ((cont (node-cont call))
(atype (continuation-asserted-type cont))
(dtype (node-derived-type call)))
(when (or (and (eq (template-result-types template) :conditional)
(let ((dest (continuation-dest cont)))
(and (if-p dest)
(immediately-used-p (if-test dest) call))))
(template-results-ok template dtype)
(and (not (and (eq (template-policy template) :fast-safe)
safe-p))
(continuation-type-check cont)
(template-results-ok template
(values-type-intersection
dtype atype))))
(when (if (eq (template-result-types template) :conditional)
(let ((dest (continuation-dest cont)))
(and (if-p dest)
(immediately-used-p (if-test dest) call)))
(or (template-results-ok template dtype)
(and (or (not (eq (template-policy template)
:fast-safe))
(not safe-p))
(continuation-type-check cont)
(template-results-ok template
(values-type-intersection
dtype atype)))))
(return (values template rejected (rest templates))))))
(setq rejected template))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment