BOA constructors don't typecheck &OPTIONAL args

Bug #1508735 reported by Douglas Katzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
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)
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
status: New → Fix Committed
Stas Boukarev (stassats)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.