DEFCLASS fails to signal an ERROR when inheriting from T.

Bug #861004 reported by Jean-Philippe Paradis
6
This bug affects 1 person
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-SOCKETS-ADDRINFO :ASDF2 :ASDF :ASDF-UNIX :ANSI-CL
 :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
 :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86 :UNIX :ELF :LINUX
 :SB-THREAD :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD
 :C-STACK-IS-CONTROL-STACK :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP
 :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS
 :CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
 :LINKAGE-TABLE :OS-PROVIDES-DLOPEN :OS-PROVIDES-DLADDR :OS-PROVIDES-PUTWC
 :OS-PROVIDES-SUSECONDS-T :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL)

Changed in sbcl:
importance: Undecided → Low
status: New → Triaged
tags: added: ansi easy pcl
Revision history for this message
Nick Levine (ndl) wrote :
Changed in sbcl:
assignee: nobody → Nick Levine (ndl)
tags: added: review
Nick Levine (ndl)
Changed in sbcl:
status: Triaged → In Progress
Stas Boukarev (stassats)
summary: - DEFCLASS fails to signal an ERROR when inheriting from a BUILT-IN-CLASS
+ DEFCLASS fails to signal an ERROR when inheriting from T.
Revision history for this message
Christophe Rhodes (csr21-cantab) wrote :

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?

Revision history for this message
Christophe Rhodes (csr21-cantab) wrote :
Changed in sbcl:
status: In Progress → Fix Released
Revision history for this message
Nick Levine (ndl) wrote : Re: [Bug 861004] Re: DEFCLASS fails to signal an ERROR when inheriting from T.

> Date: Tue, 29 Apr 2014 12:12:34 -0000
> From: Christophe Rhodes <email address hidden>
>
> 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?

Only "sorry for taking a month to reply". Anyway I see you submitted
your fix now.

If I ever have time to remind myself what and how SBCL is, and if
nobody else got there first, I'll take a look at 1184325.

- nick

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.