From f28a5f7dbb522b873720d6a7696bb47dda23d88a Mon Sep 17 00:00:00 2001 From: sperber Date: Tue, 18 Mar 2003 12:48:53 +0000 Subject: [PATCH] Merge rev 120 from Scheme 48 svn repo: Modified: s48/tuebingen/trunk/scheme/rts/jar-defrecord.scm Log: Subject: Fix hygiene bug in DEFINE-RECORD-TYPE DEFINE-RECORD-TYPE would expand into the wrong thing if there was a field name identical to the name of the type that appears as a constructor argument; the constructor used that same name as a parameter, shadowing the name for the type. The fix was to rename those parameters before including them in the output. --- scheme/rts/jar-defrecord.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scheme/rts/jar-defrecord.scm b/scheme/rts/jar-defrecord.scm index ddaa981..2a16267 100644 --- a/scheme/rts/jar-defrecord.scm +++ b/scheme/rts/jar-defrecord.scm @@ -46,9 +46,9 @@ (%unspecific (r 'unspecific)) (name (cadr e)) (type (caddr e)) - (args (map car (cadddr e))) + (args (map r (map car (cadddr e)))) (arg-types (map cadr (cadddr e))) - (fields (caddr (cddr e)))) + (fields (map r (caddr (cddr e))))) (define (mem? name list) (cond ((null? list) #f) ((c name (car list)) #t)