loop destructures non-conformingly
ECL's loop uses destructure-bind where it should do something else.
(loop with (a b) = '(1) do (return (list a b)))
(loop for (a b) = '(1) do (return (list a b)))
This should return (1 nil), because of http://www.lispworks.com/documentation/HyperSpec/Body/06_aag.htm:
During loop expansion, each variable in the variable list is matched with the values in the values list. If there are more variables in the variable list than there are values in the values list, the remaining variables are given a value of nil. If there are more values than variables listed, the extra values are discarded.
VERSION "20.4.24"
VCS-ID "6b789092c48f25e87a99cfeb42f33e7d49f0c1ec"
OS "Linux"
OS-VERSION "5.4.0-40-generic"
MACHINE-TYPE "x86_64"
FEATURES (:SWANK :SERVE-EVENT :QUICKLISP :ASDF-PACKAGE-SYSTEM :ASDF3.1
:ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P
:ASDF-UNICODE :WALKER :CDR-1 :CDR-5 :LINUX :FORMATTER :CDR-7
:ECL-WEAK-HASH :LITTLE-ENDIAN :ECL-READ-WRITE-LOCK :LONG-LONG
:UINT64-T :UINT32-T :UINT16-T :COMPLEX-FLOAT :LONG-FLOAT :UNICODE
:DFFI :CLOS-STREAMS :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS
:THREADS :BOEHM-GC :ANSI-CL :COMMON-LISP
:FLOATING-POINT-EXCEPTIONS :IEEE-FLOATING-POINT
:PACKAGE-LOCAL-NICKNAMES :CDR-14 :PREFIXED-API :FFI :X86_64
:COMMON :ECL)
Problem reported by Steve Losh.
-
Add the test to ansi-tests when done.
Edited by Daniel Kochmański