Created
July 16, 2019 11:17
-
-
Save pkulev/4da8e07a1a1cedd6770938e8bf20832a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/pkulev/4da8e07a1a1cedd6770938e8bf20832a#file-boom-lisp-L25