From: Pekka P. Pirinen
Subject: Re: strange defclass behavior
Date: 
Message-ID: <ixityhtuwo.fsf@harlequin.co.uk>
kp gores <·····@sip.medizin.uni-ulm.de> writes:
> (defclass a () [...]
> (defmethod print-object ((a a) stream)
>    (format stream   "this is an a ~S~%" (b a)))
> 
> Warning: Undefined type: A

It's actually a warning, so the code should work.  Might run a bit
slower.

> wrapping the defclass with eval-when (compile load) solves the problem.

Add EVAL as well, even if you don't plan to run it interpreted.  It's
a bug waiting to happen, otherwise.

> shouldn't the compiler know the class A?

It should, for a DEFMETHOD parameter specializer like that, according
to the standard (last paragraph in the description of DEFCLASS).  I
guess CMUCL just doesn't.  EVAL-WHEN will stop the warning.
-- 
Pekka P. Pirinen, Harlequin Limited
Hell is other posters.
  - Nancy Lebovitz  (nancyL_universe.digex.net)