Closed ohnoitsavram closed 8 years ago
Right, the declarations being off is definitely wrong. However, I'm going to change both declarations to (or null nesting-node)
as that seems the only sensible choice in the context of a DOM, where only a nesting-node can contain other nodes.
Currently
parent
is declaimedHowever, the type of
%parent
isThe main issue is that, at least on SBCL,
returns
foo
, when you'd expectbar
. This is because SBCL assumesparent
will be anested-node
, due to the declamation, and optimizes the branch away.My particular use case is that I'm subclassing plump's dom classes, but am representing the root node as just another element that happens to have no parent. I think this is fairly reasonable.
As a work around I've done:
So the declaimed type of the accessor matches the type of the slot.