Skip to content
Snippets Groups Projects
Commit 0634baa7 authored by rtoy's avatar rtoy
Browse files

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.
parent 6f8b2114
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment