gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Calling for top ten ANSI issues ...


From: Paul F. Dietz
Subject: Re: [Gcl-devel] Calling for top ten ANSI issues ...
Date: Thu, 25 Sep 2003 20:46:25 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Camm Maguire wrote:
Greetings!  I'm committing a change now which removes the all the
remaining define-condition errors save these two:

=============================================================================
Test CL-TEST::CONDITION-20-SLOTS.2 failed
Form: (LET ((CL-TEST::*CONDITION-20/S1-VAL* 0)
            (CL-TEST::*CONDITION-20/S2-VAL* 10))
        (DECLARE (SPECIAL CL-TEST::*CONDITION-20/S1-VAL*
                          CL-TEST::*CONDITION-20/S2-VAL*))
        (LET ((CL-TEST::C
                  (MAKE-CONDITION 'CL-TEST::CONDITION-20 :I1
                      'CL-TEST::X)))
          (VALUES (CL-TEST::NOTNOT
                      (TYPEP CL-TEST::C 'CL-TEST::CONDITION-20))
                  (CL-TEST::CONDITION-20/S1 CL-TEST::C)
                  (CL-TEST::CONDITION-20/S2 CL-TEST::C)
                  CL-TEST::*CONDITION-20/S1-VAL*
                  CL-TEST::*CONDITION-20/S2-VAL*)))
Expected values: T
                 CL-TEST::X
                 11
                 0
                 11
Actual values: T
               CL-TEST::X
               12
               0
               12.
Test CL-TEST::CONDITION-20-SLOTS.3 failed
Form: (LET ((CL-TEST::*CONDITION-20/S1-VAL* 0)
            (CL-TEST::*CONDITION-20/S2-VAL* 10))
        (DECLARE (SPECIAL CL-TEST::*CONDITION-20/S1-VAL*
                          CL-TEST::*CONDITION-20/S2-VAL*))
        (LET ((CL-TEST::C
                  (MAKE-CONDITION 'CL-TEST::CONDITION-20 :I2
                      'CL-TEST::Y)))
          (VALUES (CL-TEST::NOTNOT
                      (TYPEP CL-TEST::C 'CL-TEST::CONDITION-20))
                  (CL-TEST::CONDITION-20/S1 CL-TEST::C)
                  (CL-TEST::CONDITION-20/S2 CL-TEST::C)
                  CL-TEST::*CONDITION-20/S1-VAL*
                  CL-TEST::*CONDITION-20/S2-VAL*)))
Expected values: T
                 1
                 CL-TEST::Y
                 1
                 10
Actual values: T
               2
               CL-TEST::Y
               2
               10.
=============================================================================

Paul, can you perhaps clarify the origin of this failure for me?


These tests are confirming that each :default-initargs form is only evaluated 
when
needed, and is evaluated only once if so:

(define-condition-with-tests condition-20 nil
  ((s1 :reader condition-20/s1 :initarg :i1)
   (s2 :reader condition-20/s2 :initarg :i2))
  (:default-initargs :i1 (incf *condition-20/s1-val*)
                     :i2 (incf *condition-20/s2-val*)))

For some reason the implementation is evaluating the initform *twice*.

IIRC, CMUCL and SBCL had this problem too (with CLOS), so it's probably 
something
from the original PCL.

        Paul






reply via email to

[Prev in Thread] Current Thread [Next in Thread]