Browse files

Ensure generic functions during compilation time as well.

This avoids unknown function warning when outside WITH-COMPILATION-UNIT.
  • Loading branch information...
1 parent 07c2992 commit beb09a0683a56f8f8a25fc7358bdd2dd45061a97 @Ramarren committed Jan 20, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 defmodel.lisp
@@ -50,9 +50,11 @@ See the Lisp Lesser GNU Public License for more details.
(remove nil
(when reader-fn
- `(ensure-generic-function ',reader-fn :lambda-list '(self)))
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
+ (ensure-generic-function ',reader-fn :lambda-list '(self))))
(when writer-fn
- `(ensure-generic-function '(setf ,writer-fn) :lambda-list '(new-value self)))))))))
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
+ (ensure-generic-function '(setf ,writer-fn) :lambda-list '(new-value self))))))))))
;; define slot macros before class so they can appear in
;; initforms and default-initargs

0 comments on commit beb09a0

Please sign in to comment.