[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is this a bug or not?
Hey fans,
Define:
(defclass meta1 (standard-class) ())
in one file, and compile and load this file.
Define:
(defclass my-metaclass (meta1)
())
(defclass my-class () () (:metaclass my-metaclass))
in another file (say meta-error.lisp),
compiling this file leads to:
USER(395): (compile-file "meta-error.lisp")
; --- Compiling file /users/lothar/prokon/konwerk-obk/meta-error.lisp ---
; While compiling (:TOP-LEVEL-FORM "meta-error.lisp" 2):
Error: While computing the class precedence list of the class named META1.
The class named META1 is a forward referenced class.
The class named META1 is a direct superclass of the class named META1.
[condition type: PROGRAM-ERROR]
Restart actions (select using :continue):
0: retry the compilation of /users/lothar/prokon/konwerk-obk/meta-error.lisp
1: continue compiling /users/lothar/prokon/konwerk-obk/meta-error.lisp but generate no output file
[changing package from "COMMON-LISP-USER" to "CLOS"]
[1] CLOS(396):
Having all definitions in one file,
or separating the definition of my-class in another file,
or simply loading the file meta-error.lisp
lead to the desired behaviour (i.e. defining the classes without an error).
The problem might occure because meta1 is not known in the compiler
environment, there for a forward referenced class is created...?
Are there any other solutions as separating definitions in files?
Best wishes
lothar
Lothar Hotz
University of Hamburg phone: +49-40-4123-6536
Departement of Computer Science fax: +49-40-4123-6530
Bodenstedtstrasse 16 email: HOTZ@fbihh.informatik.uni-hamburg.de
2000 Hamburg 50
Germany