Ticket #882 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[patch] (restart-case (warn ... ))

Reported by: jlawrence Owned by: rme
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: restart-case restart-case-form Cc:

Description

(handler-bind ((warning (lambda (w)
                          (declare (ignore w))
                          (invoke-restart 'eleven))))
  (restart-case (warn "foo")
    (eleven () 11)))

=>

value #<SIMPLE-CONDITION #x302000E8041D> is not of the expected type WARNING.
   [Condition of type TYPE-ERROR]

A simple-error is created by error, but a simple-warning is not created by warning :)

--- ccl/lib/macros.lisp	(revision 15001)
+++ ccl/lib/macros.lisp	(working copy)
@@ -409,7 +409,7 @@
           ((signal error warn)
            (destructuring-bind
              (cond &rest args) expansion
-             (setq condform `(condition-arg ,cond (list ,@args) ,(if (eq head 'warning)
+             (setq condform `(condition-arg ,cond (list ,@args) ,(if (eq head 'warn)
                                                                    ''simple-warning
                                                                    (if (eq head 'error)
                                                                      ''simple-error

Attachments

macros.lisp.patch Download (735 bytes) - added by jlawrence 3 years ago.

Change History

Changed 3 years ago by jlawrence

comment:1 Changed 3 years ago by rme

  • Owner set to rme
  • Status changed from new to assigned

comment:2 Changed 3 years ago by rme

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [15002]) Apply restart-case-form patch from ticket:882.

Fixes ticket:882.

Note: See TracTickets for help on using tickets.