diff --git a/collects/racket/private/class-internal.rkt b/collects/racket/private/class-internal.rkt index a0e648029f..86c4c3dacd 100644 --- a/collects/racket/private/class-internal.rkt +++ b/collects/racket/private/class-internal.rkt @@ -4157,7 +4157,7 @@ (trace-begin (trace (inspect-event o)) (let ([o* (if (has-original-object? o) (original-object o) o)]) - (let loop ([c (object-ref o)] + (let loop ([c (object-ref o*)] [skipped? #f]) (if (struct? ((class-insp-mk c))) ;; current objec can inspect this object diff --git a/collects/tests/racket/contract-mzlib-test.rktl b/collects/tests/racket/contract-mzlib-test.rktl index b18aa0dc37..28df566071 100644 --- a/collects/tests/racket/contract-mzlib-test.rktl +++ b/collects/tests/racket/contract-mzlib-test.rktl @@ -2760,10 +2760,6 @@ of the contract library does not change over time. (test #t (contract-eval 'is-a?) (contract-eval `(contract (object-contract) ,o 'pos 'neg)) i<%>) (test #t (contract-eval 'is-a?) (contract-eval `(contract (object-contract) ,o 'pos 'neg)) c%)) - ;; Currently the new object contracts using impersonators don't even attempt to ensure that - ;; these reflective operations still work, and I'm not even sure they should. For now, I'll - ;; just comment them out so that we can revive them if we decide that they should work. - #| (let ([c% (parameterize ([current-inspector (make-inspector)]) (contract-eval '(class object% (super-new))))]) (test (list c% #f) @@ -2785,7 +2781,6 @@ of the contract library does not change over time. ,obj 'pos 'neg)))) -|# ; ; diff --git a/collects/tests/racket/contract-test.rktl b/collects/tests/racket/contract-test.rktl index 36aedd6fac..20d4129450 100644 --- a/collects/tests/racket/contract-test.rktl +++ b/collects/tests/racket/contract-test.rktl @@ -6045,8 +6045,8 @@ (test #t (contract-eval 'is-a?) (contract-eval `(contract (object-contract) ,o 'pos 'neg)) c%)) ;; Currently the new object contracts using impersonators don't even attempt to ensure that - ;; these reflective operations still work, and I'm not even sure they should. For now, I'll - ;; just comment them out so that we can revive them if we decide that they should work. + ;; these reflective operations still work, and I'm not even sure they should. For now, I + ;; just get the class info from the original object, which means that all contracts are evaded. ;; ;; Just as a note, if we move the class-insp-mk values forward in class/c-proj and make-wrapper-class, ;; we get a failure in object->vector for the second testcase because the field-ref/field-set! in the @@ -6054,7 +6054,6 @@ ;; know how to get the fields out of the object struct. We can always force it with unsafe-struct-ref, ;; but if we had impersonate-struct-type, with the same ability to replace the prop:object as ;; impersonate-struct has, then we might be able to handle this better. - #| (let ([c% (parameterize ([current-inspector (make-inspector)]) (contract-eval '(class object% (super-new))))]) (test (list c% #f) @@ -6076,7 +6075,6 @@ ,obj 'pos 'neg)))) -|# ;