diff --git a/src/c/list.d b/src/c/list.d index a1258c5ec..099ce972b 100644 --- a/src/c/list.d +++ b/src/c/list.d @@ -210,6 +210,10 @@ append_into(cl_object head, cl_object *tail, cl_object l) tail = append_into(head, tail, other); } if (narg) { + if (!Null(*tail)) { + /* (APPEND '(1 . 2) 3) */ + FEtype_error_proper_list(head); + } *tail = cl_va_arg(rest); } @(return head) @@ -223,6 +227,10 @@ ecl_append(cl_object x, cl_object y) if (!Null(x)) { tail = append_into(head, tail, x); } + if (!Null(*tail)) { + /* (APPEND '(1 . 2) 3) */ + FEtype_error_proper_list(head); + } *tail = y; return head; }