#231: DEFSTRUCT accessor functions overwrite accessors in :INCLUDEd structs
------------------------+---------------------------------------------------
Reporter: ehuelsmann | Owner: mevenson
Type: defect | Status: new
Priority: major | Milestone: 1.1.0
Component: libraries | Version:
Keywords: |
------------------------+---------------------------------------------------
Ralf Moeller reports:
The following file causes a problem in ABCL (1.1.0-dev-svn-14041) when
compiled (!) and loaded.
(in-package cl-user)
(defstruct a (s1 nil))
(defstruct (b (:include a) (:conc-name foo-)) (s2 nil))
(defstruct (c (:include a) (:conc-name foo-)) (s3 nil))
(defun test ()
(let ((x (make-b :s1 1 :s2 2)))
(foo-s1 x)))
CL-USER(4): (test)
#<THREAD "interpreter" {2EF7D41F}>: Debugger invoked on condition of type
SIMPLE-TYPE-ERROR
The value #<B {564434F7}> is not of type C.
Restarts:
0: TOP-LEVEL Return to top level.
[1] CL-USER(6): (lisp-implementation-version)
"1.1.0-dev-svn-14041"
[1] CL-USER(7):
The problem is that the defstruct declaration for c "overwrites" the
accessor foo-s1 generated by defstruct b.
If foo-s1 is called for a b instance, the type assertions introduced by
define-reader (and define-writer, see the
ABCL implementation for defstruct) cause the error described above.
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/231>
armedbear <http://common-lisp.net/project/armedbear>
armedbear
#165: pprint-logical-block fails for format with list directive
----------------------------+-----------------------------------------------
Reporter: mevenson | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: 0.27
Component: other | Version: 0.27
Keywords: sbcl-buildhost |
----------------------------+-----------------------------------------------
Derived from the problems getting SBCL to compile, the following test
fails with complaints in the XP package:
{{{
(defparameter *stream* *error-output*)
(defun pprint-test ()
(pprint-logical-block (*stream* nil :prefix "---")
(format *stream* "~(~A~)" '(1 2 3 4))))
}}}
with this error
{{{
The value #S(XP::XP-STRUCTURE :BASE-STREAM #S(SLIME-OUTPUT-STREAM) :LINE-
LENGTH 70 :LINE-LIMIT NIL :LINE-NO 1 :DEPTH-IN-BLOCKS 2 :BLOCK-STACK #(0 0
3 NIL NIL NIL NIL NIL NIL NIL ...) :BLOCK-STACK-PTR 2 :BUFFER … is not of
type STREAM.
[Condition of type TYPE-ERROR]
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/165>
armedbear <http://common-lisp.net/project/armedbear>
armedbear
#118: Lisp.getUpgradedElementType returns more types than supported by
'make_array.java'
------------------------+---------------------------------------------------
Reporter: ehuelsmann | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: libraries | Version:
Keywords: |
------------------------+---------------------------------------------------
The above leads to possible failure: each upgraded element type has its
own associated defaultInitialValue. If the code does not specify the right
initial value, NIL is taken, which probably is not a good fit.
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/118>
armedbear <http://common-lisp.net/project/armedbear>
armedbear
#277: reinitialize-instance on class metaobjects incorrect
-----------------------+----------------------------------------------------
Reporter: rschlatte | Owner: rschlatte
Type: defect | Status: new
Priority: major | Milestone:
Component: (A)MOP | Version:
Keywords: |
-----------------------+----------------------------------------------------
Reported by Pascal Costanza:
Consider the following test case:
{{{
CL-USER(1): (use-package :mop)
T
CL-USER(2): (defclass a () ())
#<STANDARD-CLASS A {794563AA}>
CL-USER(3): (defclass b (a) ())
#<STANDARD-CLASS B {62F6FB59}>
CL-USER(4): (finalize-inheritance (find-class 'a))
NIL
CL-USER(5): (finalize-inheritance (find-class 'b))
NIL
CL-USER(6): (class-precedence-list (find-class 'b))
(#<STANDARD-CLASS B {62F6FB59}> #<STANDARD-CLASS A {794563AA}> #<STANDARD-
CLASS STANDARD-OBJECT {23309E87}> #<BUILT-IN-CLASS T {100C62C8}>)
CL-USER(7): (reinitialize-instance (find-class 'b))
#<STANDARD-CLASS B {62F6FB59}>
CL-USER(8): (class-precedence-list (find-class 'b))
(#<STANDARD-CLASS B {62F6FB59}> #<STANDARD-CLASS STANDARD-OBJECT
{23309E87}> #<BUILT-IN-CLASS T {100C62C8}>)
}}}
The invocation of reinitialize-instance obviously reinitialized the
direct-superclasses slot, and thus removed the superclass a.
However, according to the HyperSpec, the general protocol for
reinitialize-instance is always that slots for which no initargs are
provided through reinitialize-instance should be left untouched. This also
restated implicitly in the CLOS MOP specification, for example in the
section "Initialization of Class Metaobjects:" The defaulted superclass
list is specified to be only assigned during initialization, but not
during reinitialization.
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/277>
armedbear <http://common-lisp.net/project/armedbear>
armedbear
#276: defmethod doesn't call add-method
-----------------------+----------------------------------------------------
Reporter: rschlatte | Owner: rschlatte
Type: defect | Status: new
Priority: major | Milestone:
Component: (A)MOP | Version:
Keywords: |
-----------------------+----------------------------------------------------
Reported by Pascal Costanza:
There is a problem that a defmethod may not call add-method as it should.
Here is a transcript:
{{{
CL-USER(1): (use-package :mop)
T
CL-USER(2): (defclass my-generic-function (standard-generic-function) ()
(:metaclass funcallable-standard-class))
#<FUNCALLABLE-STANDARD-CLASS MY-GENERIC-FUNCTION {3606AFA2}>
CL-USER(3): (defgeneric f (x) (:generic-function-class my-generic-
function))
#<MY-GENERIC-FUNCTION F {589D4D84}>
CL-USER(4): (defmethod add-method :after ((gf my-generic-function) (m
standard-method)) (print :foo))
#<STANDARD-METHOD ADD-METHOD :AFTER (MY-GENERIC-FUNCTION STANDARD-METHOD)
{3F4C428F}>
CL-USER(5): (defmethod f ((x integer)) (+ x x))
#<STANDARD-METHOD F (INTEGER) {27A5DAC0}>
CL-USER(6): (add-method #'f *)
:FOO
#<MY-GENERIC-FUNCTION F {589D4D84}>
CL-USER(7): (f 5)
10
}}}
…or maybe just :after methods on add-method are not called…
--
Ticket URL: <http://trac.common-lisp.net/armedbear/ticket/276>
armedbear <http://common-lisp.net/project/armedbear>
armedbear