:FROM-END
** ELT signals an error of type TYPE-ERROR when the index argument
is not a valid sequence index;
+ ** LOOP signals (at macroexpansion time) an error of type
+ PROGRAM-ERROR when duplicate variable names are found;
* fixed bug 166: compiler preserves "there is a way to go"
invariant when deleting code.
* fixed bug 172: macro lambda lists with required arguments after
((eq l (cdr *loop-source-code*)) (nreverse new))))
(defun loop-error (format-string &rest format-args)
- (error "~?~%current LOOP context:~{ ~S~}."
- format-string
- format-args
- (loop-context)))
+ (error 'sb!int:simple-program-error
+ :format-control "~?~%current LOOP context:~{ ~S~}."
+ :format-arguments (list format-string format-args (loop-context))))
(defun loop-warn (format-string &rest format-args)
(warn "~?~%current LOOP context:~{ ~S~}."
(print t))))
(declare (ignore function warnings-p))
(assert failure-p))
+
+;;; a bug reported by Paul F. Dietz (in his ANSI test suite):
+;;; duplicate bindings in LOOP must signal errors of type
+;;; PROGRAM-ERROR.
+(assert (typep (nth-value 1
+ (ignore-errors
+ (funcall (lambda ()
+ (loop for (a . a) in '((1 . 2) (3 . 4))
+ return a)))))
+ 'program-error))
\ No newline at end of file
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.9.30"
+"0.7.9.31"