fix bug in hashing shortcut for transparency
This commit is contained in:
parent
9e93ee2682
commit
2236363696
|
@ -2562,6 +2562,16 @@
|
|||
(equal-hash-code ht)
|
||||
(equal-secondary-hash-code ht))
|
||||
|
||||
;; Check that an equal hash code on an
|
||||
;; mutable, opaque structure does not
|
||||
;; see mutation.
|
||||
(let ()
|
||||
(struct a (x [y #:mutable]))
|
||||
(define an-a (a 1 2))
|
||||
(define v (equal-hash-code an-a))
|
||||
(set-a-y! an-a 8)
|
||||
(test v equal-hash-code an-a))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Misc
|
||||
|
||||
|
|
|
@ -3061,7 +3061,7 @@ int scheme_struct_is_transparent(Scheme_Object *s)
|
|||
|
||||
stype = ((Scheme_Structure *)s)->stype;
|
||||
|
||||
for (p = stype->name_pos; p--; ) {
|
||||
for (p = stype->name_pos + 1; p--; ) {
|
||||
if (SCHEME_TRUEP(stype->parent_types[p]->inspector))
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user