Skip to content

Instantly share code, notes, and snippets.

@pkulev
Created July 16, 2019 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkulev/4da8e07a1a1cedd6770938e8bf20832a to your computer and use it in GitHub Desktop.
Save pkulev/4da8e07a1a1cedd6770938e8bf20832a to your computer and use it in GitHub Desktop.
(defpackage :dat-application
(:use :cl)
(:export #:application))
(in-package :dat-application)
(defvar *application*)
(defclass application ()
((data :initform 0)))
(defmethod initialize-instance :after ((app application) &key &allow-other-keys)
(setf *application* app))
(defpackage :sasapp
(:use :cl))
(in-package :sasapp)
(defclass sas-application (dat-application:application)
())
(let ((inst (make-instance 'sas-application)))
(setf (slot-value inst 'data) 10)
(assert (= 10 (slot-value inst 'data))))
(in-package :dat-application)
(describe *application*)
@pkulev
Copy link
Author

pkulev commented Jul 16, 2019

https://gist.github.com/pkulev/4da8e07a1a1cedd6770938e8bf20832a#file-boom-lisp-L25

When attempting to
set the slot's value to 10 (SETF of SLOT-VALUE), the slot DATA
is missing from the object #<SAS-APPLICATION {100394E333}>.
   [Condition of type SIMPLE-ERROR]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment