Record inheritance bug?

Bug #248145 reported by Derick Eddington
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
Medium
Abdulaziz Ghuloum

Bug Description

Just noticed this, no priority to me. If my interpretation of the report is correct, I think this should make B be a subtype of A:

Ikarus Scheme version 0.0.3+ (revision 1537, build 2008-07-13)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

> (define-record-type A)
> (define-record-type B
    (parent-rtd
      (record-rtd (make-A))
      (make-record-constructor-descriptor (record-rtd (make-A)) #f #f)))
> (A? (make-B))
#f ;; Should be #t right?
>

Doing the analogous thing (at least, the most analogous thing I could figure out) with the procedural layer works:

>
  (define C-rtd
    (make-record-type-descriptor 'C #f #f #f #f '#()))
  (define C-cd
    (make-record-constructor-descriptor C-rtd #f #f))
  (define make-C
    (record-constructor C-cd))
  (define C?
    (record-predicate C-rtd))
>
  (define D-rtd
    (make-record-type-descriptor 'D (record-rtd (make-C)) #f #f #f '#()))
  (define D-cd
    (make-record-constructor-descriptor
     D-rtd
     (make-record-constructor-descriptor (record-rtd (make-C)) #f #f)
     #f))
  (define make-D
    (record-constructor D-cd))
>
> (C? (make-D))
#t
>

Related branches

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in 1538. define-record-type simply ignored the parent-rtd clause.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Medium
status: New → Fix Committed
Changed in ikarus:
milestone: none → 0.0.4
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.