Compile-time type checking for slot against initform

Bug #1850423 reported by Pierre Neidhardt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

I can compile this:

(defclass foo ()
  ((name :type number :initform 17)))

It would be nice if SBCL would print a type warning at compile time.

It's especially relevant when the initform is some complex global variable defined somewhere else.

Thoughts?

Revision history for this message
Pierre Neidhardt (ambrevar) wrote :

Sorry, I meant

(defclass foo ()
  ((name :type number :initform "17")))

Revision history for this message
Stas Boukarev (stassats) wrote :

189c1c47a1a50d06e21fa6240eec27ed2fbdbd0b

Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Vinced (vincezd) wrote :

That's great, thank you.

Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
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.