[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in nested :around methods



;;; -*- Package: PCL; Mode: Lisp; Syntax: Common-Lisp; -*-

;;; In PCL version 2-7-88, Symbolics Genera 7.1,
;;; nested :around methods cause infinite loops:

(defclass class1 () ())
(defclass class2 (class1) ())
(defclass class3 (class2) ())

(defmethod fee ((x class1) &optional val)
  (print val)) 

(defmethod fee :around ((x class1) &optional (val 1))
  (print val)
  (call-next-method))

(defmethod fee :around ((x class2) &optional (val 2))
  (print val)
  (call-next-method))

(defmethod fee :around ((x class3) &optional (val 3))
  (print val)
  (call-next-method))



(setf x3 (make-instance 'class3))

;; evaluating:
(fee x3)
;; never gets past (method fee :around (class2))
John Alan McDonald, Statistics, GN-22, U of W, Seattle, Wa. 98195
(206) 545 7438, 543 2517
jam@entropy.ms.washington.edu
{decvax,ihnp4,ucbvax!lbl-csam}!uw-beaver!entropy!jam