diff --git a/pkgs/racket-test-core/tests/racket/chaperone.rktl b/pkgs/racket-test-core/tests/racket/chaperone.rktl index 4952289362..88308dfb27 100644 --- a/pkgs/racket-test-core/tests/racket/chaperone.rktl +++ b/pkgs/racket-test-core/tests/racket/chaperone.rktl @@ -3597,6 +3597,22 @@ (test #f hash-ref-key ht1 "absent" #f) (err/rt-test (hash-ref-key ht2 "absent") exn:fail:contract?)) + +;; ---------------------------------------- +;; regression test to make sure a hash-code function +;; is inherited for a chaperoned struct + +(let () + (struct a () + #:property prop:equal+hash (list + (lambda (a b eql?) #t) + (lambda (a hc) 1) + (lambda (a hc) 1))) + + (struct b a (x)) + + (test #t integer? (equal-hash-code (chaperone-struct (b 0) b-x (lambda (b v) v))))) + ;; ---------------------------------------- (report-errs) diff --git a/racket/src/cs/compile-file.ss b/racket/src/cs/compile-file.ss index 9c5eb218f7..4fa101c119 100644 --- a/racket/src/cs/compile-file.ss +++ b/racket/src/cs/compile-file.ss @@ -56,7 +56,7 @@ (loop args))] [(get-opt args "--srcloc" 0) => (lambda (args) - (generate-procedure-source-information #f) + (generate-procedure-source-information #t) (loop args))] [(get-opt args "--unsafe" 0) => (lambda (args) diff --git a/racket/src/cs/rumble/impersonator.ss b/racket/src/cs/rumble/impersonator.ss index 140ad71ef3..e0ef67469b 100644 --- a/racket/src/cs/rumble/impersonator.ss +++ b/racket/src/cs/rumble/impersonator.ss @@ -675,9 +675,8 @@ (define (set-impersonator-hash!) (let ([struct-impersonator-hash-code (escapes-ok - (lambda (c hash-code) - ((record-type-hash-procedure - (record-rtd (impersonator-val c))) + (lambda (c hash-code) + ((record-hash-procedure (impersonator-val c)) c hash-code)))]) (let ([add (lambda (rtd)