ruricolist / serapeum

Utilities beyond Alexandria
MIT License
420 stars 41 forks source link

Declare return type of make #97

Closed ruricolist closed 2 years ago

ruricolist commented 2 years ago

It would be nice if (make 'some-class) expanded into

(the class (make-instance 'class)

Or even

(assure class (make-instance 'some-class))

However, on SBCL, this breaks Serapeum itself. In particular it breaks when loading vector.lisp, because of the sealed classes there.

Unexpected metatype for #<SB-KERNEL:WRAPPER (ID=1968) for FLOAT-VECTOR {5049CE83}>.
This is probably a bug in SBCL itself.

This problem comes from transform-instance-typep in typetran.lisp in the SBCL source. It triggers specifically when:

As of yet however I have not come up with a reduced case that reliably triggers the bug.

ruricolist commented 2 years ago

Addressed in c0330ca. See also https://bugs.launchpad.net/sbcl/+bug/1948018.