weixin_39631755 2020-11-29 17:33
浏览 0

loop destructure bug (shared with ecl)

reported by beach in #clasp

lisp
COMMON-LISP-USER> (loop with (a b) = '(1) for (c d) = '(2) do (return (list a b c d)))

Condition of type: SIMPLE-ERROR
Too few arguments supplied to a macro or a destructuring-bind form:
(1)
Available restarts:
(use :r1 to invoke restart 1, etc.)

1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.


(CORE::DM-TOO-FEW-ARGUMENTS (1))
COMMON-LISP-USER>> (clasp-debug:print-backtrace)

   4: (CORE::DM-TOO-FEW-ARGUMENTS (1))
   5: CORE:REPL
   6: ((METHOD CLASP-CLEAVIR::CCLASP-EVAL-WITH-ENV (T T)) (BLOCK NIL (LET ((#1=#:LOOP-DESTRUCTURE-1333 '(1))) (DESTRUCTURING-BIND (A B . #2=#:G1334) #1# (DECLARE (IGNORE #2#)) (LET ((C NIL) (D NIL)) (CORE::LOOP-BODY NIL (NIL (CORE::LOOP-REALLY-DESETQ #3=(C D) #4='(2)) NIL NIL) ((RETURN (LIST A B C D))) (NIL (CORE::LOOP-REALLY-DESETQ #3# #4#) NIL NIL) NIL))))) NIL)
  15: ((LABELS CLASP-CLEAVIR::DEFAULT) (BLOCK NIL (LET ((#1=#:LOOP-DESTRUCTURE-1333 '(1))) (DESTRUCTURING-BIND (A B . #2=#:G1334) #1# (DECLARE (IGNORE #2#)) (LET ((C NIL) (D NIL)) (CORE::LOOP-BODY NIL (NIL (CORE::LOOP-REALLY-DESETQ #3=(C D) #4='(2)) NIL NIL) ((RETURN (LIST A B C D))) (NIL (CORE::LOOP-REALLY-DESETQ #3# #4#) NIL NIL) NIL))))) NIL)
  16: (CLASP-CLEAVIR::SIMPLE-EVAL (LOOP WITH (A B) = '(1) FOR (C D) = '(2) DO (RETURN (LIST A B C D))) NIL #<standard-generic-function clasp-cleavir::cclasp-eval-with-env>)
  17: (CLASP-CLEAVIR::CCLASP-EVAL (LOOP WITH (A B) = '(1) FOR (C D) = '(2) DO (RETURN (LIST A B C D))) NIL)
  18: (FLET CORE::REP)
  21: (CORE::TPL :NOPRINT NIL)
  30: _RUN-ALL/Users/karstenpoeck/lisp/compiler/clasp-karsten/src/lisp/kernel/lsp/epilogue-cclasp.lisp
</standard-generic-function>

`

该提问来源于开源项目:clasp-developers/clasp

  • 写回答

7条回答 默认 最新

  • weixin_39631755 2020-11-29 17:33
    关注

    Fails also with identical message in ecl, works in sbcl. the following works fine: (loop with (a b) = '(1 nil) for (c d) = '(2 nil) do (return (list a b c d)))

    评论

报告相同问题?