unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#38611: Guile 2.9.7 regression: "duplicate" record field names
@ 2019-12-14 13:31 Göran Weinholt
  2020-01-12 20:56 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Göran Weinholt @ 2019-12-14 13:31 UTC (permalink / raw)
  To: 38611

Hello schemers,

The following program works in Guile 2.2.6 (and other R6RS
implementations), but raises an exception in Guile 2.9.7. A field called
"name" exists in record type a and record type b, but there is no actual
naming conflict as I understand it.

--8<---------------cut here---------------start------------->8---
(import (rnrs))

(define-record-type a
  (fields name))

(define-record-type b
  (parent a)
  (fields name))

(let ((x (make-b 'a 'b)))
  (write (list (a-name x)
               (b-name x)))
  (newline))
--8<---------------cut here---------------end--------------->8---

It should print (a b). The backtrace:

--8<---------------cut here---------------start------------->8---
Backtrace:
In ice-9/boot-9.scm:
  1722:10  8 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           7 (apply-smob/0 #<thunk 56291f86b320>)
In ice-9/boot-9.scm:
    718:2  6 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8  5 (_ #(#(#<directory (guile-user) 56291f8eff00>)))
In ice-9/boot-9.scm:
   2792:4  4 (save-module-excursion _)
  4336:12  3 (_)
In /tmp/foo.sps:
      6:0  2 (_)
In ice-9/boot-9.scm:
  1090:10  1 (make-record-type b ((immutable name)) _ #:parent _ # _ ?)
  1073:12  0 (append-fields _ _)

ice-9/boot-9.scm:1073:12: In procedure append-fields:
duplicate field name
--8<---------------cut here---------------end--------------->8---

Regards,

-- 
Göran Weinholt   | https://weinholt.se/
Debian developer | 73 de SA6CJK





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#38611: Guile 2.9.7 regression: "duplicate" record field names
  2019-12-14 13:31 bug#38611: Guile 2.9.7 regression: "duplicate" record field names Göran Weinholt
@ 2020-01-12 20:56 ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2020-01-12 20:56 UTC (permalink / raw)
  To: Göran Weinholt; +Cc: 38611-done

On Sat 14 Dec 2019 14:31, Göran Weinholt <goran@weinholt.se> writes:

> The following program works in Guile 2.2.6 (and other R6RS
> implementations), but raises an exception in Guile 2.9.7. A field called
> "name" exists in record type a and record type b, but there is no actual
> naming conflict as I understand it.
>
> (import (rnrs))
>
> (define-record-type a
>   (fields name))
>
> (define-record-type b
>   (parent a)
>   (fields name))
>
> (let ((x (make-b 'a 'b)))
>   (write (list (a-name x)
>                (b-name x)))
>   (newline))

Fixed in master.  Thanks for the report!

Andy





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-12 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-14 13:31 bug#38611: Guile 2.9.7 regression: "duplicate" record field names Göran Weinholt
2020-01-12 20:56 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).