User defined sequences, types and MAKE-SEQUENCE.

Bug #1315846 reported by Mark Cox on 2014-05-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Jan Moringen

Bug Description

The function MAKE-SEQUENCE signals the wrong error for the following:

  (defclass simple-sbcl-sequence (sequence)
    ())

  (deftype sbcl-sequence ()
    'simple-sbcl-sequence)

  (make-sequence 'sbcl-sequence 10)

This signals

  simple-sbcl-sequence is a bad type specifier for sequences.
    [Condition of type simple-type-error]

The expected condition should be of type NO-APPLICABLE-METHOD or
SEQUENCE::PROTOCOL-UNIMPLEMENTED as there is no MAKE-SEQUENCE-LIKE
method defined for instances of the SIMPLE-SBCL-SEQUENCE class.

Attached is a patch that fixes the issue.

I would argue that a test should be added as this type and class
combination is needed to (partly) mimic the SIMPLE-ARRAY and
%SIMPLE-ARRAY-CLASS pattern defined in the standard.

Jan Moringen (scymtym) on 2014-05-04
Changed in sbcl:
assignee: nobody → Jan Moringen (scymtym)
Jan Moringen (scymtym) on 2014-05-04
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers