fix rename-transformer-target
for chaperoned structs
This commit is contained in:
parent
5ef75682d7
commit
2bdb8c1de5
|
@ -1126,4 +1126,14 @@
|
|||
|
||||
;; ----------------------------------------
|
||||
|
||||
(let ()
|
||||
(struct foo (id)
|
||||
#:property prop:rename-transformer 0)
|
||||
|
||||
(test 'x syntax-e
|
||||
(rename-transformer-target
|
||||
(chaperone-struct (foo #'x) foo-id (lambda (f x) x)))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -1799,7 +1799,7 @@ Scheme_Object *scheme_rename_transformer_id(Scheme_Object *o)
|
|||
v = scheme_struct_type_property_ref(rename_transformer_property, o);
|
||||
if (SCHEME_BOXP(v)) v = SCHEME_BOX_VAL(v);
|
||||
if (SCHEME_INTP(v)) {
|
||||
v = ((Scheme_Structure *)o)->slots[SCHEME_INT_VAL(v)];
|
||||
v = scheme_struct_ref(o, SCHEME_INT_VAL(v));
|
||||
if (!is_stx_id(v)) {
|
||||
v = scheme_datum_to_syntax(scheme_intern_symbol("?"), scheme_false, scheme_false, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user