From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12261 invoked by alias); 25 Dec 2006 23:30:02 -0000 Received: (qmail 12214 invoked by uid 22791); 25 Dec 2006 23:30:01 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 25 Dec 2006 23:29:54 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kBPNTm6s021667; Mon, 25 Dec 2006 18:29:48 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kBPNTmLC027175; Mon, 25 Dec 2006 18:29:48 -0500 Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.12.8) with ESMTP id kBPNTlkg029449; Mon, 25 Dec 2006 18:29:47 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id AAB40378945; Mon, 25 Dec 2006 14:23:32 -0700 (MST) To: Mark Wielaard Cc: classpath@gnu.org, mauve-discuss@sourceware.org Subject: Re: Mauve vs 1.5 References: <1167062788.2969.43.camel@localhost.localdomain> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Mon, 25 Dec 2006 23:30:00 -0000 In-Reply-To: <1167062788.2969.43.camel@localhost.localdomain> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00008.txt.bz2 >>>>> "Mark" == Mark Wielaard writes: [ CharArrayWriter and Appendable ] Mark> Now this is of course easily fixed by using -1.5 so the compiler knows Mark> about covariant return types and makes all these tests that define Mark> classes that extend some Writer class compile again. Yes, let's do that... Mark> But now we have another problem. Shown by anything that has implements a Mark> retrofitted Comparable interface like Integer: Mark> 1. ERROR in gnu/testlet/java/lang/Integer/compareTo.java line 98: Mark> harness.check(zero.compareTo(o) == 0); Mark> ^^^^^^^^^ Mark> The method compareTo(Integer) in the type Integer is not applicable for the arguments (Object) In this code, 'o' is just 'zero' cast to an Object. You could just change it to use compareTo(zero), but that doesn't test the same thing... You could change it to: harness.check(((Comparable) zero).compareTo(o) == 0); This will check using the raw Comparable and preserve the meaning of the test, more or less. Tom