Opened 11 years ago

Closed 11 years ago

#271 closed defect (fixed)

No error for unknown defclass class options

Reported by: gz Owned by: gb
Priority: minor Milestone:
Component: ANSI CL Compliance Version:
Keywords: Cc:

Description

? (defclass erroneous-class.13 ()
   (a b c)
   (#.(gensym)))
#<STANDARD-CLASS ERRONEOUS-CLASS.13>
? (make-instance 'erroneous-class.13)
#<ERRONEOUS-CLASS.13 #x300044399DDD>
?

The spec says a program-error is required for unsupported options. This may have been augmented by the MOP, I don't know. But in any case, some indication of a problem should be given at some point.

After a little poking about, it seems like the problem is this method:

 (defmethod initialize-instance :before ((class class) &key &allow-other-keys)
  (setf (%class.ctype class) (make-class-ctype class)))

The &allow-other-keys in this method causes keyword arg checking for class objects to be disabled. I wonder it it would be worthwhile (or even allowed) to treat methods that have &allow-other-keys without &rest as not disabling initialization arg checking.

Change History (1)

comment:1 Changed 11 years ago by gz

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r9049

Note: See TracTickets for help on using tickets.