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

Problem with type declarations in PCL.

All the following is based on Sun Common Lisp 3.0 for the Sun-4 with patches
loaded -> 3.0.1.  The production compiler is loaded either on top of
lisp-3-0-base or from lisp-3-0-full.

1) CLX compiles (and runs my limited examples) if it is compiled before
   PCL is loaded.  (CLX use defstruct in that case; not defclass)

2) I have not tried compiling CLX on top of Sun's PCL "8/24/88 (beta)
   AAAI PCL"  Actually, I don't remember if I've tried...

3) For May Day PCL (Rev 2) 5/1/90 :

It seems that at compile time PCL classes do not have a known type.  CLX
uses lots of forms like this:

(defclass foo () ())

(defun bar (a-foo)
  (declare (type foo a-foo))

(defun baz (a-foo)
  (identity (the foo a-foo)))

Compilation of the above forms produces:

> (compile-file "test.lisp")
;;; Reading source file "test.lisp"
;;; While compiling BAR
;;; Warning: Illegal type specifier in (TYPE FOO A-FOO)
>>Error: FOO is an unknown type.

:A  0: Abort to Lisp Top Level

->  0
;;; Backtrace shows that compiler is processing 'BAZ when the error occurs.

Whose error is this: PCL's, CLX's, or mine?

-- Ed