chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #123: tinyclos primitive class extension procedures a


From: Chicken Trac
Subject: [Chicken-janitors] #123: tinyclos primitive class extension procedures are buggy
Date: Mon, 16 Nov 2009 11:28:26 -0000

#123: tinyclos primitive class extension procedures are buggy
--------------------------------+-------------------------------------------
 Reporter:  tonysidaway         |       Owner:  tonysidaway
     Type:  defect              |      Status:  new        
 Priority:  minor               |   Milestone:             
Component:  extensions          |     Version:  4.2.x      
 Keywords:  tinyclos primitive  |  
--------------------------------+-------------------------------------------
 Chicken's implementation of tinyclos has an excellent facility to extend
 the primitive classes recognised by tinyclos.

 The code is basically sound but there are bugs.  For instance:

 csi -R srfi-19 -R tinyclos
 (define d (make-date 0 1 10 13 20 11 2009 0))
 (date? d)
 ===> #t
 (define <date> (new-structure-class "date" 'date))
 (class-name (class-of d))
 ===> "structure"

 The correct result is "date".

 This is because of a bug in the procedure structure-class-of, which is
 called by class-of when a primitive object has been found to be a record.
 The procedure uses the eq? operator to test the actual object instead of
 looking at the object's structure tag (#sys#slot obj 0).

-- 
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/123>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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