From 05e2b658ef1d8ba151fd731ec32ad39325ae0fbe Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Sat, 27 Oct 2007 19:14:13 +0000 Subject: [PATCH] Correction to bug 9022 svn: r7579 --- collects/profj/to-scheme.ss | 3 ++- collects/profj/types.ss | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/collects/profj/to-scheme.ss b/collects/profj/to-scheme.ss index 0f104777f9..0b9e5b3c84 100644 --- a/collects/profj/to-scheme.ss +++ b/collects/profj/to-scheme.ss @@ -868,7 +868,8 @@ ,@(generate-wrapper-fields fields from-dynamic?) ,@(generate-wrapper-methods - (filter (lambda (m) (not (eq? (method-record-rtype m) 'ctor))) + (filter (lambda (m) (and (not (eq? (method-record-rtype m) 'ctor)) + (not (object-method? m)))) wrapped-methods) #f from-dynamic?) ,@extra-methods )))) diff --git a/collects/profj/types.ss b/collects/profj/types.ss index 6f6fb80647..97d6f41173 100644 --- a/collects/profj/types.ss +++ b/collects/profj/types.ss @@ -33,6 +33,17 @@ (define comparable-type (make-ref-type "Comparable" `("java" "lang"))) (define cloneable-type (make-ref-type "Cloneable" `("java" "lang"))) + (define (object-method? m-rec) + (or + (and (equal? (method-record-name m-rec) "equals") + (eq? (method-record-rtype m-rec) 'boolean) + (= 1 (length (method-record-atypes m-rec))) + (type=? object-type (car (method-record-atypes m-rec)))) + (and (equal? (method-record-name m-rec) "hashcode") + (eq? (method-record-rtype m-rec) 'int) + (= 0 (length (method-record-atypes m-rec)))) + )) + ; ; ; ; ; ;