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

Metaclass bug in Rainy Day PCL ?



I received the following log from Mr. Noritoshi Rokujo @ Fujitsu.

I think something is wrong with Rainy Day version,
since the same code is OK with Victoria Day.

Masayuki Ida
Aoyama Gakuin Univ.

PS: Thank you Gregor for your continuous efforts on PCL.
You did  great jobs on object oriented world for Common Lisp
and on mutual understanding between US and Japan.



-- simplified sources causing problems --

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

(in-package 'pcl)

(defclass my-metaclass (standard-class)
  ())

(defmethod check-super-metaclass-compatibility
  ((class my-metaclass) (super standard-class))
  t)

(defclass box01 ()()  (:metaclass my-metaclass))
(defclass box02 ()()  (:metaclass my-metaclass))
(defclass box03 ()()  (:metaclass my-metaclass))
(defclass box04 ()()  (:metaclass my-metaclass))
(defclass box05 ()()  (:metaclass my-metaclass))

(defmethod open-box ((arg1 box01))
  (format t "This is a instance of BOX01~%"))
(defmethod open-box ((arg1 box02))
  (format t "This is a instance of BOX02~%"))
(defmethod open-box ((arg1 box03))
  (format t "This is a instance of BOX03~%"))
(defmethod open-box ((arg1 box04))
  (format t "This is a instance of BOX04~%"))
(defmethod open-box ((arg1 box05))
  (format t "This is a instance of BOX05~%"))

----- A session causes unexpected actions -----

> (open-box (make-instance 'box01))
This is a instance of BOX01
NIL
> (open-box (make-instance 'box02))
This is a instance of BOX02
NIL
> (open-box (make-instance 'box03))
This is a instance of BOX02
NIL
> (open-box (make-instance 'box04))
This is a instance of BOX02
NIL

> (open-box (make-instance 'box05))
This is a instance of BOX02
NIL

----- box03, box4, box5 cases are incorrect -----
testes with the following:
SUN3-60 SunOS4.0.3
SunCommonLisp(Lucid CommonLisp) 3.0.1
2/16/90  Rainy Day PCL (beta 3)
-----------------------------------------------------