From 0634baa785e174c0a395409e01bf9f8abde9c32c Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Mon, 6 Jun 2005 14:32:23 +0000 Subject: [PATCH] Fix CALL-METHOD used outside of emf from. Fix from Gerd, cmucl-imp, 2005-06-04 for the following test: (define-method-combination mc () ((primary () :required t)) `(restart-case (call-method ,(first primary)) ())) (defgeneric foo () (:method-combination mc) (:method () nil)) (foo) It turns out this is caused by RESTART-CASE macroexpanding its case expression, which it does to see if it starts with ERROR or similar. An ANSI thing, if I remember correctly. --- pcl/combin.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcl/combin.lisp b/pcl/combin.lisp index a904e97b5..3af8b49c2 100644 --- a/pcl/combin.lisp +++ b/pcl/combin.lisp @@ -25,7 +25,7 @@ ;;; ************************************************************************* (file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/combin.lisp,v 1.23 2004/04/02 15:24:02 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/combin.lisp,v 1.24 2005/06/06 14:32:23 rtoy Exp $") (in-package "PCL") @@ -178,7 +178,10 @@ (defmacro call-method (&rest args) (declare (ignore args)) - `(error "~@<~S used outsize of a effective method form.~@:>" 'call-method)) + ;; + ;; Hack: The PROGN is here so that RESTART-CASE doesn't see the + ;; ERROR. See MUNGE-RESTART-CASE-EXPRESSION in code:error.lisp. + `(progn (error "~@<~S used outsize of a effective method form.~@:>" 'call-method))) (defmacro call-method-list (&rest calls) `(progn ,@calls)) -- GitLab