+
+;;; Reported by Michael Weber: restart computation in :TEST-FUNCTION used to
+;;; cause infinite recursion.
+(defun restart-test-finds-restarts ()
+ (restart-bind
+ ((bar (lambda ()
+ (return-from restart-test-finds-restarts 42))
+ :test-function
+ (lambda (condition)
+ (find-restart 'qux))))
+ (when (find-restart 'bar)
+ (invoke-restart 'bar))))
+(assert (not (restart-test-finds-restarts)))
+
+(with-test (:name :bug-896379)
+ (let ((*evaluator-mode* :compile))
+ (handler-bind ((style-warning #'error))
+ (let ((reader (gensym "READER"))
+ (name (gensym "FOO-ERROR")))
+ (eval `(define-condition ,name (error)
+ ((slot :initarg :slot :reader ,reader))
+ (:report (lambda (c stream)
+ (format stream "Oops: ~S" (,reader c))))))))))