lisp-binary
lisp-binary copied to clipboard
Add subtyping support for `defbinary`
Before this PR, the struct types declared through defbinary
did not have a subtype relationship with the types they :include
, potentially losing some code reuse capability. This PR makes the following possible:
(defbinary a ()
(header 0 :type (unsigned-byte 32)))
(defbinary b (:include a)
(body 0 :type (unsigned-byte 32)))
(subtypep 'b 'a) ; => T, T