Commit 80c53f0e authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

cmp: fix (values (values))

This must return nil as a single value while we were returning no
values.
parent 36a9c95c
......@@ -184,7 +184,7 @@
(defun c1form-single-valued-p (form)
(or (fourth (gethash (c1form-name form) +c1-form-hash+))
(<= (nth-value 1 (c1form-values-number form)) 1)))
(= (nth-value 1 (c1form-values-number form)) 1)))
(defmacro with-c1form-env ((form value) &rest body)
`(let* ((,form ,value)
......
......@@ -2002,3 +2002,14 @@
(compile nil fun)))
(is (null errors-p))
(is (= (funcall compiled-fun 0) 2)))))
;;; Date 2020-08-14
;;; Description
;;;
;;; (values (values)) was miscompiled and returned no value
;;; instead of the correct nil
(test cmp.0085.values-values
(is (equal '(nil)
(multiple-value-list
(funcall
(compile nil '(lambda () (values (values)))))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment