BOA constructors don't typecheck &OPTIONAL args

Bug #1508735 reported by Douglas Katzman on 2015-10-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

 (defstruct (myfoo (:constructor make-myfoo (a &optional b))) (a 0 :type fixnum) (b nil :type fixnum))

* (make-myfoo 3)
#S(MYFOO :A 3 :B NIL)

even even more obviously wrong:
* (make-myfoo 3 nil)
#S(MYFOO :A 3 :B NIL)

The first case is understandable because it weakened B's type to allow for the default,
but the second example has no justification at all.

Douglas Katzman (dougk) on 2015-11-07
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
status: New → Fix Committed
Stas Boukarev (stassats) on 2015-12-19
Changed in sbcl:
status: Fix Committed → Fix Released
assignee: Douglas Katzman (dougk) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers