master: Return one value from (append/nconc (values 1 2))

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  04d757a9988b75bb44f649ca80186eadb3d7728d (commit)
      from  41a13309df2a4b42c439c5a133962634a9ce9654 (commit)

- Log -----------------------------------------------------------------
commit 04d757a9988b75bb44f649ca80186eadb3d7728d
Author: Stas Boukarev <[email protected]>
Date:   Fri Apr 10 23:15:38 2026 +0300

    Return one value from (append/nconc (values 1 2))
---
 src/compiler/srctran.lisp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp
index 988a113e1..edefee755 100644
--- a/src/compiler/srctran.lisp
+++ b/src/compiler/srctran.lisp
@@ -217,14 +217,14 @@
 (define-source-transform append (&rest lists)
   (case (length lists)
     (0 nil)
-    (1 (car lists))
+    (1 `(prog1 ,(car lists)))
     (2 `(sb-impl::append2 ,@lists))
     (t (values nil t))))
 
 (define-source-transform nconc (&rest lists)
   (case (length lists)
     (0 ())
-    (1 (car lists))
+    (1 `(prog1 ,(car lists)))
     (t (values nil t))))
 
 ;;; (append nil nil nil fixnum) => fixnum

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.