DEFCLASS fails to signal an ERROR when inheriting from T.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Nick Levine |
Bug Description
What I do and what happens:
(defclass foo (t)
())
=> #<STANDARD-CLASS FOO>
What I expected to happen:
An error getting thrown at compile-time, or perhaps runtime.
Analysis:
From CLHS BUILT-IN-CLASS:
"Attempting to use defclass to define subclasses of a built-in class signals an error of type error."
SBCL version: 1.0.51
uname -a: Linux dynamorph 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:08:37 UTC 2011 i686 GNU/Linux
*features*:
(:SWANK :QUICKLISP :SB-BSD-
:COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
:SB-EVAL :SB-SOURCE-
:SB-THREAD :LARGEFILE :GENCGC :STACK-
:C-STACK-
:RAW-INSTANCE-
:STACK-
:CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-
:LINKAGE-TABLE :OS-PROVIDES-DLOPEN :OS-PROVIDES-DLADDR :OS-PROVIDES-PUTWC
:OS-PROVIDES-
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: ansi easy pcl |
Changed in sbcl: | |
status: | Triaged → In Progress |
summary: |
- DEFCLASS fails to signal an ERROR when inheriting from a BUILT-IN-CLASS + DEFCLASS fails to signal an ERROR when inheriting from T. |
Changed in sbcl: | |
status: | In Progress → Fix Released |
I worked a bit on this. I didn't really like the separation between implementation (able to perform magic subclassing) and
user (not able to), so I've gone a different way, by defining a new SYSTEM-CLASS metaclass as an interposing superclass
of BUILT-IN-CLASS. I think this meets the requirements, though it does somewhat make a mockery of the "easy" tag. Comments?