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

defconstant/defclass problem

Using Genera 8.1.1 on a MacIvory III, we're having an unexpected problem
compiling a file that uses a constant as the initform for a slot.  When you try
to compile this file (listed below), the compiler complains that the variable
FOO is unbound.  Because the compiler needs to know the value of a constant in
order to open-code it, I had always assumed that the compiler bound the constant
at compile time, but this appears not to be the case.  What gives?  This seems
like a bug to us.

;;; -*- Mode: LISP; Syntax: Ansi-common-lisp; Package: CL-USER; Base: 10 -*-

(defconstant foo 0)

(defclass bar ()
  ((baz :initform foo)))