Record inheritance bug?
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))
(
> (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-
(define C-cd
(make-
(define make-C
(record-
(define C?
(record-
>
(define D-rtd
(make-
(define D-cd
(make-
D-rtd
(make-
#f))
(define make-D
(record-
>
> (C? (make-D))
#t
>
Related branches
Changed in ikarus: | |
milestone: | none → 0.0.4 |
Fixed in 1538. define-record-type simply ignored the parent-rtd clause.